Module: LogBook::Recorder::RecordingInstanceMethods
- Defined in:
- lib/log_book/recorder.rb
Instance Method Summary collapse
- #non_recording_columns ⇒ Object
- #recording_attributes ⇒ Object
- #recording_changes ⇒ Object
- #recording_key ⇒ Object
- #recording_options ⇒ Object
- #save_with_recording ⇒ Object
- #with_recording(&block) ⇒ Object
Instance Method Details
#non_recording_columns ⇒ Object
45 46 47 |
# File 'lib/log_book/recorder.rb', line 45 def non_recording_columns self.class.non_recording_columns end |
#recording_attributes ⇒ Object
41 42 43 |
# File 'lib/log_book/recorder.rb', line 41 def recording_attributes attributes.except(*non_recording_columns) end |
#recording_changes ⇒ Object
25 26 27 |
# File 'lib/log_book/recorder.rb', line 25 def recording_changes @recording_changes ||= RecordingChanges.new(self) end |
#recording_key ⇒ Object
49 50 51 |
# File 'lib/log_book/recorder.rb', line 49 def recording_key "#{self.class.table_name}_#{id}" end |
#recording_options ⇒ Object
29 30 31 |
# File 'lib/log_book/recorder.rb', line 29 def self.class. end |
#save_with_recording ⇒ Object
33 34 35 |
# File 'lib/log_book/recorder.rb', line 33 def save_with_recording with_recording { save } end |
#with_recording(&block) ⇒ Object
37 38 39 |
# File 'lib/log_book/recorder.rb', line 37 def with_recording(&block) self.class.with_recording(&block) end |