Sha256: f7f66d0d45b39062d7cd4b39b24a74c58c698470c38d0574366aecb7f1d59cd6

Contents?: true

Size: 627 Bytes

Versions: 6

Compression:

Stored size: 627 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

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