Why can't I save to a join table in a migration or rake task


#1

I’ve tried to put this in a migration and in a rake task but nothing
gets created in the roles_users join table:

User.find(:all).each {|u| u.roles << member_role; u.save! }

It works fine from script/console.