Lets build a "has_many :through" Association
I would like to see a topic where we create a hasmany :through association in Rails 4. For example, if a doctor has many patients through appointments and appointments have dates, how do we do things like: doctor.appointments.today or appointments.today.patients.where(doctor_id: 1) ?
I have not been able to find a good example for hasmany :through.
I found a good example of a HABTM/Rails 4 http://habtmexample.herokuapp.com/instructions
We are actually fighting with has_many :through right now on our project. We use it a ton, but something happened to break the assigning functionality from 4.0.5 to 4.0.8...I'd love to discuss this, because it is a powerful and important feature of ActiveRecord (and I personally hate HABTM :) )