Class: Notee::ApplicationRecord

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/notee/application_record.rb

Direct Known Subclasses

Category, Image, Post, User

Instance Method Summary collapse

Instance Method Details

#create_authorityObject



15
16
17
# File 'app/models/notee/application_record.rb', line 15

def create_authority
  Authority.check('create', self)
end

#destroy_authorityObject



23
24
25
# File 'app/models/notee/application_record.rb', line 23

def destroy_authority
  Authority.check('destroy', self)
end

#is_destroy?Boolean

Returns:

  • (Boolean)


27
28
29
30
# File 'app/models/notee/application_record.rb', line 27

def is_destroy?
  return true if self.is_deleted == true
  false
end

#update_authorityObject



19
20
21
# File 'app/models/notee/application_record.rb', line 19

def update_authority
  Authority.check('update', self)
end