Module: LogBook::Recorder::RecordingClassMethods
- Defined in:
- lib/log_book/recorder.rb
Instance Method Summary collapse
Instance Method Details
#default_ignored_attributes ⇒ Object
108 109 110 |
# File 'lib/log_book/recorder.rb', line 108 def default_ignored_attributes [primary_key, inheritance_column, *Array.wrap(LogBook.config.ignored_attributes)] end |
#non_recording_columns ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/log_book/recorder.rb', line 95 def non_recording_columns @non_recording_columns ||= begin = if [:only] except = column_names - Array.wrap([:only]).flatten.map(&:to_s) else except = default_ignored_attributes except |= Array([:except]).collect(&:to_s) if [:except] end except end end |
#recording_columns ⇒ Object
91 92 93 |
# File 'lib/log_book/recorder.rb', line 91 def recording_columns columns.select { |c| !non_recording_columns.include?(c.name) } end |