Sha256: bdc621176839964a354e4db1f338117e30e8dc7f18b646b15f0f549a361d5cb8

Contents?: true

Size: 675 Bytes

Versions: 11

Compression:

Stored size: 675 Bytes

Contents

module Cms
  class GroupType < ActiveRecord::Base
    attr_accessible :name, :guest, :cms_access

    has_many :groups, :class_name => 'Cms::Group'
    has_many :group_type_permissions, :class_name => 'Cms::GroupTypePermission'
    has_many :permissions, :through => :group_type_permissions, :class_name => 'Cms::Permission'

    scope :guest, :conditions => ["#{GroupType.table_name}.guest = ?", true]
    scope :non_guest, :conditions => ["#{GroupType.table_name}.guest = ?", false]

    scope :cms_access, :conditions => ["#{GroupType.table_name}.cms_access = ?", true]
    scope :non_cms_access, :conditions => ["#{GroupType.table_name}.cms_access = ?", false]

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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