Class: Lesli::Account::Log
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Lesli::Account::Log
- Defined in:
- app/models/lesli/account/log.rb
Class Method Summary collapse
- .log(system_module_action, system_process, title = nil, description = nil, payload = nil) ⇒ Object
- .log_email(system_module_action, title = "email_sent", description = "email", payload = nil) ⇒ Object
Class Method Details
.log(system_module_action, system_process, title = nil, description = nil, payload = nil) ⇒ Object
37 38 39 40 41 42 43 44 45 |
# File 'app/models/lesli/account/log.rb', line 37 def self.log(system_module_action, system_process, title=nil, description=nil, payload=nil) Account.first.activities.create( system_module: system_module_action, system_process: system_process, description: description, title: title, payload: payload ) end |
.log_email(system_module_action, title = "email_sent", description = "email", payload = nil) ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'app/models/lesli/account/log.rb', line 47 def self.log_email(system_module_action, title="email_sent", description="email", payload=nil) Account&.first&.logs&.create( system_module: system_module_action, system_process: "mailer", description: description, payload: payload, title: title ) end |