070_add_users_to_non_admins.rb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:1k
源码类别:
Ajax
开发平台:
Others
- class AddUsersToNonAdmins < ActiveRecord::Migration
- class Profile < ActiveRecord::Base
- include BareMigration
- serialize :profiles
- end
- def self.up
- Profile.find_by_label("publisher").update_attributes(:modules => [:dashboard, :write, :content, :feedback, :users ])
- Profile.find_by_label("contributor").update_attributes(:modules => [:dashboard, :users ])
- end
- def self.down
- Profile.find_by_label("publisher").update_attributes(:modules => [:dashboard, :write, :content, :feedback ])
- Profile.find_by_label("contributor").update_attributes(:modules => [])
- end
- end