Item belongs_to :user attr_accessible :user is this safe? Item.user_id is still protected, and Item.user can't be set by mass assignment from a web request because the parameters are all strings - trying to assign a string to Item.user raises AssociationTypeMismatch. Even setting params['item']['user'] to an empty string would raise an error.
The benefit of this approach is that I can still use mass assignment of associations in my own code. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

