module Sequel::Plugins::Paranoid::EnableDefaultScope::InstanceMethods
Public Instance Methods
_update_without_checking(columns)
click to toggle source
Sequel
patch to allow updates to deleted instances when default scope is enabled
# File lib/sequel/plugins/paranoid.rb, line 151 def _update_without_checking(columns) # figure out correct pk conditions (see base#this) conditions = this.send(:joined_dataset?) ? qualified_pk_hash : pk_hash # turn off with deleted, added the pk conditions back in update_with_deleted_dataset = this.with_deleted.where(conditions) # run the original update on the with_deleted dataset update_with_deleted_dataset.update(columns) end