Skip to content

Instantly share code, notes, and snippets.

@walidvb
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save walidvb/9932157 to your computer and use it in GitHub Desktop.

Select an option

Save walidvb/9932157 to your computer and use it in GitHub Desktop.
Book
has_many chapters
accepts_nested_attributes_for :chapters, :allow_destroy => true
Chapter
belongs_to :book
has_one :storyboard
has_many :tiles, :through => :storyboard
accepts_nested_attributes_for :tiles, :allow_destroy => true
Storyboard
belongs_to :chapter
has_many :tiles
accepts_nested_attributes_for :tiles, :allow_destroy => true
Tile
belongs_to :storyboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment