Created
April 30, 2017 08:15
-
-
Save tbuehlmann/4c14c401be79559edff6b86a7f31bd38 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 Distance < ApplicationRecord | |
has_many :events # only if you need to be able to call distance.events | |
end |
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 Event < ApplicationRecord | |
belongs_to :style | |
belongs_to :distance | |
end |
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 Style < ApplicationRecord | |
has_many :events # only if you need to be able to call style.events | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment