Sha256: 214e17710795460ef6e0d90fbf55370049a36f8faab7b78d27fb7206bea68723
Contents?: true
Size: 237 Bytes
Versions: 2
Compression:
Stored size: 237 Bytes
Contents
class GiveAllUsersUserRole < ActiveRecord::Migration def self.up user_role = Role.find_by_name("user") users = User.find(:all) users.each{|u| u.roles << user_role u.save } end def self.down end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree-0.7.1 | db/migrate/20090302221152_give_all_users_user_role.rb |
spree-0.7.0 | db/migrate/20090302221152_give_all_users_user_role.rb |