Created
November 25, 2013 19:24
-
-
Save laspluviosillas/7647186 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Programme < AR::Base | |
has_many :villages | |
has_many :conversations, though: :villages | |
end | |
class Village < AR::Base | |
has_many :discussions | |
has_many :conversations, through: :discussions | |
end | |
class Discussion < AR::Base | |
belongs_to :village | |
has_many :conversations | |
end | |
class Conversation < AR::Base | |
belongs_to :discussion | |
has_one :change | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment