Sha256: 1d0677c93b8c8e494e60e622addcdd2a57cbd54f0df835bdb626d2b2760fb98e
Contents?: true
Size: 931 Bytes
Versions: 6
Compression:
Stored size: 931 Bytes
Contents
class MoveUsersToProfiles < 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, :profile ]) Profile.find_by_label("contributor").update_attributes(:modules => [:dashboard, :profile ]) Profile.find_by_label("admin").update_attributes(:modules => [:dashboard, :write, :content, :feedback, :themes, :sidebar, :users, :settings, :profile]) end def self.down Profile.find_by_label("publisher").update_attributes(:modules => [:dashboard, :write, :content, :feedback, :users ]) Profile.find_by_label("contributor").update_attributes(:modules => [:dashboard, :users ]) Profile.find_by_label("admin").update_attributes(:modules => [:dashboard, :write, :content, :feedback, :themes, :sidebar, :users, :settings ]) end end
Version data entries
6 entries across 6 versions & 1 rubygems