Given this code, which statement about the database table “documents†could be expected to be true? class Document < ActiveRecord::Base belongs_to :documentable, polymorphic: true end class Product < ActiveRecord::Base has_many :documents, as: :documentable end class Service < ActiveRecord::Base has_many :documents, as: :documentable end
1. It would include a column for :type.
2. It would include columns for :documentable_id and :documentable_type.
3. It would include columns for :documentable and :type
4. It would include a column for :polymorphic_type.
Posted Date:-2022-09-17 03:34:23