I have the following expression:
which seems to work fine. But when I add an orders, like this:
it breaks with the following error:
ActiveRecord::ConfigurationError: Association named 'user_runs'
was not found; perhaps you misspelled it?
Any ideas why?
The model looks like this:
class Clock < ActiveRecord::Base has_and_belongs_to_many :users has_many :runs end class Run < ActiveRecord::Base belongs_to :clock has_many :user_runs has_many :users, :through => :user_runs end class UserRun < ActiveRecord::Base belongs_to :run belongs_to :user end