Any idea why I am getting this error:
Exception encountered: #<NoMethodError: undefined method `assert_valid_keys' for :widget:Symbol>
when I try to do a Factory.build(:widget) on the following model:
class Widget < ActiveRecord::Base
belongs_to :designer, :vendor
# ...
end
When I remove the belongs_to line the error goes away.
won’t work.
:vendoris treated like an option. And, of course, there isn’t such an option. See docs for further information.If you need two
belongs_torelations, just change your code to: