Created
July 31, 2014 18:34
-
-
Save RichardLitt/604b9748edea4a89d2e8 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 ParkFeature < ActiveRecord::Base | |
self.table_name = 'parks_features' | |
belongs_to :park | |
belongs_to :feature | |
end | |
class Feature < ActiveRecord::Base | |
has_many :park_features | |
has_many :parks, through: :park_features | |
end | |
class Park < ActiveRecord::Base | |
has_many :campgrounds | |
has_many :days | |
belongs_to :state | |
has_many :activities | |
has_many :features | |
has_many :campsites, through: :campgrounds | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment