module StringAttributes::Strip::ClassMethods

Public Instance Methods

set_strip(attribute) click to toggle source
# 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