Sha256: 20ac6251b3a4c84295bb1aa4f16c1da250060aa8e7a24d85265f2b3bca8816a5
Contents?: true
Size: 715 Bytes
Versions: 36
Compression:
Stored size: 715 Bytes
Contents
class AddCommentsPermissions < ActiveRecord::Migration # model removed class Permission < ActiveRecord::Base; end def self.up Permission.create :controller => "news", :action => "add_comment", :description => "label_comment_add", :sort => 1130, :is_public => false, :mail_option => 0, :mail_enabled => 0 Permission.create :controller => "news", :action => "destroy_comment", :description => "label_comment_delete", :sort => 1133, :is_public => false, :mail_option => 0, :mail_enabled => 0 end def self.down Permission.where("controller=? and action=?", 'news', 'add_comment').first.destroy Permission.where("controller=? and action=?", 'news', 'destroy_comment').first.destroy end end
Version data entries
36 entries across 36 versions & 2 rubygems