Method: Sequel::Model#update_without
- Defined in:
- lib/egalite/sequel_helper.rb
#update_without(hash, *selection) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/egalite/sequel_helper.rb', line 8 def update_without(hash, *selection) hash = hash.clone selection.flatten.each { |k| hash.delete(k.to_s) if hash.key?(k.to_s) } selection.flatten.each { |k| hash.delete(k.to_sym) if hash.key?(k.to_sym) } update(hash) end |