Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@gabidavila
Created August 8, 2017 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabidavila/9ae257151087c03a300820ddbd395672 to your computer and use it in GitHub Desktop.
Save gabidavila/9ae257151087c03a300820ddbd395672 to your computer and use it in GitHub Desktop.
class Captain < ActiveRecord::Base
has_many :boats
end
class Boat < ActiveRecord::Base
belongs_to :captain
has_many :boat_classifications
has_many :classifications, through: :boat_classifications
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment