module RailsSoftDeletable::Associations

Public Instance Methods

target_scope_with_deleted() click to toggle source
# File lib/rails_soft_deletable/rails/associations.rb, line 11
def target_scope_with_deleted
  scope = target_scope_without_deleted

  if scope && options[:with_deleted] && klass.soft_deletable?
    scope = scope.with_deleted
  end

  scope
end