Class: ApplicationRecord

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
ApipieDSL::Class, AuditAssociations::AssociationsDefinitions
Defined in:
app/models/application_record.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from AuditAssociations::AssociationsDefinitions

audit_associations, audited, configure_dirty_associations, normalize_associations

Class Method Details

.graphql_type(new_graphql_type = nil) ⇒ Object


26
27
28
29
30
31
32
# File 'app/models/application_record.rb', line 26

def self.graphql_type(new_graphql_type = nil)
  if new_graphql_type
    @graphql_type = new_graphql_type
  else
    @graphql_type || superclass.try(:graphql_type)
  end
end

.loggerObject

Rails use Notifications for own sql logging so we can override sql logger for orchestration


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

def self.logger
  Foreman::Logging.logger('app')
end

Instance Method Details

#loggerObject


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

def logger
  self.class.logger
end