Class: Faalis::Group

Inherits:
Object
  • Object
show all
Includes:
Concerns::Authorizable, Mongoid::Document, Mongoid::Timestamps
Defined in:
app/models/faalis/group.rb

Overview

Group model for Faalis platform

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.policy_classObject



35
36
37
# File 'app/models/faalis/group.rb', line 35

def self.policy_class
  GroupPolicy
end

Instance Method Details

#include_permission?(perm) ⇒ Boolean

Returns:

  • (Boolean)


39
40
41
42
43
44
45
# File 'app/models/faalis/group.rb', line 39

def include_permission?(perm)
  if perm.is_a? Fixnum
    permission_ids.include? perm
  else
    permission_ids.include? perm.id
  end
end

#to_sObject



47
48
49
# File 'app/models/faalis/group.rb', line 47

def to_s
  name
end