Module: LogBook::ControllerRecord
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/log_book/controller_record.rb
Instance Method Summary collapse
Instance Method Details
#current_author ⇒ Object
22 23 24 25 26 |
# File 'lib/log_book/controller_record.rb', line 22 def raise NotImplementedError unless respond_to?(LogBook.config., true) send(LogBook.config.) end |
#enable_recording ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/log_book/controller_record.rb', line 10 def enable_recording action = "#{controller_name}##{action_name}" = request_uuid = try(:request).try(:uuid) || SecureRandom.hex LogBook::Store.tree = LogBook::Tree.new(action: action, author: , request_uuid: request_uuid) LogBook.enable_recording end |
#save_records ⇒ Object
18 19 20 |
# File 'lib/log_book/controller_record.rb', line 18 def save_records LogBook::SaveRecords.call end |