You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Document < ActiveRecord::Base
has_many :sections
has_many :paragraphs, through: :sections
end
class Section < ActiveRecord::Base
belongs_to :document
has_many :paragraphs
end
class Paragraph < ActiveRecord::Base
belongs_to :section
end
Paper_Trail 4.0.0 Beta doesn't cater this situation. It looks for foreign key of association Paragraph i.e, section_id in the through model i.e, Section which will not be available in the above mentioned case.
The text was updated successfully, but these errors were encountered:
class Document < ActiveRecord::Base
has_many :sections
has_many :paragraphs, through: :sections
end
class Section < ActiveRecord::Base
belongs_to :document
has_many :paragraphs
end
class Paragraph < ActiveRecord::Base
belongs_to :section
end
Paper_Trail 4.0.0 Beta doesn't cater this situation. It looks for foreign key of association Paragraph i.e, section_id in the through model i.e, Section which will not be available in the above mentioned case.
The text was updated successfully, but these errors were encountered: