Sha256: 15a2a0a654d9155a5a77f1798a44e9e0ab4893734b85141ec01356f8956fbe8b

Contents?: true

Size: 405 Bytes

Versions: 11

Compression:

Stored size: 405 Bytes

Contents

module Cms
  class Permission < ActiveRecord::Base

    attr_accessible :name, :full_name, :description

    has_many :group_permissions, :class_name => 'Cms::GroupPermission'
    has_many :groups, :through => :group_permissions, :class_name => 'Cms::Group'

    validates_presence_of :name
    validates_uniqueness_of :name

    scope :named, lambda { |name| {:conditions => {:name => name}} }

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
browsercms-3.5.7 app/models/cms/permission.rb
browsercms-3.5.6 app/models/cms/permission.rb
browsercms-3.5.5 app/models/cms/permission.rb
browsercms-3.5.4 app/models/cms/permission.rb
browsercms-3.5.3 app/models/cms/permission.rb
browsercms-3.5.2 app/models/cms/permission.rb
browsercms-3.5.1 app/models/cms/permission.rb
browsercms-3.5.0 app/models/cms/permission.rb
browsercms-3.5.0.rc3 app/models/cms/permission.rb
browsercms-3.5.0.rc2 app/models/cms/permission.rb
browsercms-3.5.0.rc1 app/models/cms/permission.rb