Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###############strom cez 3 tabulky
- 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
- ################strom cez 4 tabulky
- 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
- has_many :xyzs
- end
- class Xyz < ActiveRecord::Base
- belongs_to :paragraph
- end
Add Comment
Please, Sign In to add comment