Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Rails 3.1 - 3 Way Associations
- #student.rb
- has_and_belongs_to_many :lessons, :join_table => :attendance
- has_many :invoices, :dependent => :destroy
- #lesson.rb
- belongs_to :course
- has_and_belongs_to_many :students, :join_table => :attendance
- #invoice.rb
- belongs_to :student
Add Comment
Please, Sign In to add comment