Method: StripAttributes.strip_record
- Defined in:
- lib/strip_attributes.rb
.strip_record(record, options = {}) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/strip_attributes.rb', line 41 def self.strip_record(record, = {}) attributes = narrow(record.attributes, ) attributes.each do |attr, value| original_value = value value = strip_string(value, ) record[attr] = value if original_value != value end record end |