you actually don't want to make attr_accessible :user_id.
you need to learn about why mass assignment is dangerous and ask yourself what it means to allow someone to assign user_id with params.