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.
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.