Module: StringAttributes::Strip::ClassMethods
- Defined in:
- lib/string_attributes/strip.rb
Instance Method Summary collapse
Instance Method Details
#set_strip(attribute) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/string_attributes/strip.rb', line 8 def set_strip(attribute) class_eval do before_validation do __send__("#{attribute}=", __send__(attribute).strip) end end end |