Module: ActiverecordUtilities::ClassMethods

Defined in:
lib/activerecord_utilities.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) nil_trim_attributes(*attributes)

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('no attributes to trim') if (attributes.map(&:to_s) - self.column_names) != []
  self.attributes_to_trim = attributes
end