Module: Sequel::Plugins::StringStripper::InstanceMethods
- Defined in:
- lib/sequel/plugins/string_stripper.rb
Instance Method Summary collapse
-
#[]=(k, v) ⇒ Object
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.
Instance Method Details
#[]=(k, v) ⇒ Object
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.
69 70 71 72 |
# File 'lib/sequel/plugins/string_stripper.rb', line 69 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 |