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