Sha256: 5d933b2f8c5a3c682136e6e529965ac392c90634f4fd465d475fb0627a8fbc7e

Contents?: true

Size: 667 Bytes

Versions: 11

Compression:

Stored size: 667 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, -> {where( ["#{GroupType.table_name}.guest = ?", true])}
    scope :non_guest, -> {where( ["#{GroupType.table_name}.guest = ?", false])}

    scope :cms_access, -> {where( ["#{GroupType.table_name}.cms_access = ?", true])}
    scope :non_cms_access, -> {where( ["#{GroupType.table_name}.cms_access = ?", false])}

  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
browsercms-artirix-4.0.4 app/models/cms/group_type.rb
browsercms-artirix-4.0.3.3 app/models/cms/group_type.rb
browsercms-artirix-4.0.3.2 app/models/cms/group_type.rb
browsercms-artirix-4.0.3.1 app/models/cms/group_type.rb
browsercms-artirix-4.0.3 app/models/cms/group_type.rb
browsercms-artirix-4.0.2 app/models/cms/group_type.rb
browsercms-artirix-4.0.1.1 app/models/cms/group_type.rb
browsercms-artirix-4.0.0.rc1.art4 app/models/cms/group_type.rb
browsercms-4.0.0.rc1 app/models/cms/group_type.rb
browsercms-4.0.0.beta app/models/cms/group_type.rb
browsercms-4.0.0.alpha app/models/cms/group_type.rb