Module: ActiverecordUtilities::ClassMethods

Defined in:
lib/activerecord_utilities.rb

Instance Method Summary collapse

Instance Method Details

#nil_trim_attributes(*attributes) ⇒ Object

any def inside here is a class method



14
15
16
17
# File 'lib/activerecord_utilities.rb', line 14

def nil_trim_attributes(*attributes) # this assigns the attributes to be trimmed
  raise if (attributes.map(&:to_s) - self.column_names) != []
  self.attributes_to_trim = attributes
end