Sha256: 841803a1fff57700eafc8f31464c127a0c75ae58c7b7a07cb8ee8dbae2e82b9f

Contents?: true

Size: 351 Bytes

Versions: 6

Compression:

Stored size: 351 Bytes

Contents

module Cms
  class Permission < ActiveRecord::Base
    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

6 entries across 6 versions & 1 rubygems

Version Path
browsercms-3.4.2 app/models/cms/permission.rb
browsercms-3.4.2.rc1 app/models/cms/permission.rb
browsercms-3.4.1 app/models/cms/permission.rb
browsercms-3.4.0 app/models/cms/permission.rb
browsercms-3.4.0.rc2 app/models/cms/permission.rb
browsercms-3.4.0.rc1 app/models/cms/permission.rb