I’m trying to use :through on a many-to-many relationship.
I’ve got the following three models:
class User < ActiveRecord::Base
has_many :submissions, :through => :authors
class Author < ActiveRecord::Base
class Submission < ActiveRecord::Base
has_many :users, :through => :authors
I’ve also got test data for each of the models, but when I try to run
either of the following in script/console I get the subsequent error:
NameError: undefined local variable or method
Any suggestions on how to figure out what I’ve done wrong?