I've been poking around this site and web and cannot find the error of
my ways here. I have a HABTM relationship between models User and Site.
I'm trying to create a few users in script/console and not having any
luck getting it to save.
u = User.find(:first) <-- returns an object
u.sites <-- returns [ ] as I expect
u.sites = [1,2] <-- gives me the following error:
ActiveRecord::AssociationTypeMismatch: Site expected, got Fixnum
I have checked my migrations and tables and everything seems to be in
order. Thanks in advance to anyone that can lend me a hand.