module Sequel::Plugins::StringStripper::InstanceMethods

Public Instance Methods

[]=(k, v) click to toggle source

Strip value if it is a non-blob string and the model hasn't been set to skip stripping for the column, before attempting to assign it to the model's values.

# File lib/sequel/plugins/string_stripper.rb, line 70
def []=(k, v)
  v = v.strip if v.is_a?(String) && !v.is_a?(SQL::Blob) && !model.skip_string_stripping?(k)
  super(k, v)
end