ActiveRecord::AssociationTypeMismatch in #create

3 views
Skip to first unread message

Jim Cropcho

unread,
Jul 14, 2008, 4:25:34 PM7/14/08
to Streamlined
Property(#-615861338) expected, got String(#-605852688)

class User < ActiveRecord::Base
has_many :properties, :through => :intermediate_links
end

class SubUser < User
end

occurred with SubUser model (a User, via STI)

This happens regardless of the value (or no value) given for
"properties" in a SubUser's #create POST.

Also occurs in Rails console if I attempt
sub_user_instance.properties << 1

which appears to be what's going on, based on the request parameters.

any help getting the association to work? I am happy to lose to the
ability to CRUD a SubUser's Properties if I can create a SubUser
instance with a form POST.
Reply all
Reply to author
Forward
0 new messages