Sha256: 989453272fc23cfb79204a301e2f364dbdb2c8abbf9433b364618c1e5056e7bf

Contents?: true

Size: 290 Bytes

Versions: 1

Compression:

Stored size: 290 Bytes

Contents

module ActsAsStrippableOn
  module Core
    def acts_as_strippable_on(*attributes)
      before_validation do
        attributes.each do |attribute|
          send(attribute).strip! if send(attribute).present? && send(attribute).respond_to?(:strip!)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_strippable_on-0.1.0 lib/acts_as_strippable_on/core.rb