ref: master
db/migrate/024_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 NewPermissions < ActiveRecord::Migration def self.up admin = Profile::Roles.admin admin.permissions += ['manage_friends', 'validate_enterprise', 'perform_task'] admin.save moderator = Profile::Roles.moderator moderator.permissions += ['manage_friends', 'perform_task'] moderator.save end def self.down admin = Profile::Roles.admin admin.permissions -= ['manage_friends', 'validate_enterprise', 'perform_task'] admin.save moderator = Profile::Roles.moderator moderator.permissions -= ['manage_friends', 'perform_task'] moderator.save end end |