module Sequel::Plugins::BlacklistSecurity::InstanceMethods

  1. lib/sequel/plugins/blacklist_security.rb

Methods

Public Instance

  1. set_except
  2. update_except

Public Instance methods

set_except(hash, *except)

Set all values using the entries in the hash, except for the keys given in except. You should probably use set_fields instead of this method, as blacklist approaches to security are a bad idea.

artist.set_except({name: 'Jim'}, :hometown)
artist.name # => 'Jim'
[show source]
   # File lib/sequel/plugins/blacklist_security.rb
75 def set_except(hash, *except)
76   set_restricted(hash, ExceptionList.new(except.flatten))
77 end
update_except(hash, *except)

Update all values using the entries in the hash, except for the keys given in except. You should probably use update_fields instead of this method, as blacklist approaches to security are a bad idea.

artist.update_except({name: 'Jim'}, :hometown) # UPDATE artists SET name = 'Jim' WHERE (id = 1)
[show source]
   # File lib/sequel/plugins/blacklist_security.rb
84 def update_except(hash, *except)
85   update_restricted(hash, ExceptionList.new(except.flatten))
86 end