module Sequel::Plugins::StringStripper::InstanceMethods

  1. lib/sequel/plugins/string_stripper.rb
Parent: StringStripper

Methods

Public Instance

  1. []=

Public Instance methods

[]= (k, v)

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.

[show source]
# 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