Sha256: 19a75906adddab464fbd7753119161b684a2509c71d806699a8842d5402dad2a
Contents?: true
Size: 597 Bytes
Versions: 14
Compression:
Stored size: 597 Bytes
Contents
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
Version data entries
14 entries across 14 versions & 1 rubygems