ref: master
db/migrate/045_more_new_permissions.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
class MoreNewPermissions < ActiveRecord::Migration def self.up admin = Profile::Roles.admin admin.permissions += ['moderate_comments'] admin.save moderator = Profile::Roles.moderator moderator.permissions += ['moderate_comments'] moderator.save end def self.down admin = Profile::Roles.admin admin.permissions -= ['moderate_comments'] admin.save moderator = Profile::Roles.moderator moderator.permissions -= ['moderate_comments'] moderator.save end end |