I\'m getting this error message:
ERROR[\"test_profile_display\", UsersProfileTest, 2.569931] test_profile_display#UsersProfileTest (2.57s)
NoMethodError:
Change characters.yml
to be
character_bazley:
sociable: bazley (User)
instead of
character_bazley:
sociable: bazley (user)
Note it is User
and not user
. The keyword used here User
will tell that the sociable_type
is of User
class.
Ref:
http://ruby-journal.com/rails/define-fixtures-with-polymorphic-association/ http://api.rubyonrails.org/v3.2.8/classes/ActiveRecord/Fixtures.html#label-Polymorphic+belongs_to