Forum: Ruby on Rails why can't I save to a join table in a migration or rake task

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
5810a1b7743eb2186ca0ea1d0a3469a0?d=identicon&s=25 Stephen Bannasch (Guest)
on 2007-05-11 01:48
(Received via mailing list)
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;! }

It works fine from script/console.
- Stephen Bannasch
   Concord Consortium,
This topic is locked and can not be replied to.