Module: ActsAsStrip::InstanceMethods
- Defined in:
- lib/acts_as_strip.rb
Overview
instance methods for active record and active model
Instance Method Summary collapse
-
#strip_fields! ⇒ Object
strip declared fields.
Instance Method Details
#strip_fields! ⇒ Object
strip declared fields
Example:
User.new(data).strip_fields
40 41 42 43 44 |
# File 'lib/acts_as_strip.rb', line 40 def strip_fields! strip_fields.each do |n| send("#{n}=", send("#{n}").strip) if send("#{n}").respond_to?('strip') end end |