Commit c1d4f029 by delba Committed by Ryan Bigg

use Model.all instead of Model.scoped

Fixes #56
parent 2a3ce8b5
......@@ -7,11 +7,11 @@ module Paranoia
def paranoid? ; true ; end
def only_deleted
scoped.tap { |x| x.default_scoped = false }.where("#{self.table_name}.deleted_at is not null")
all.tap { |x| x.default_scoped = false }.where("#{self.table_name}.deleted_at is not null")
end
def with_deleted
scoped.tap { |x| x.default_scoped = false }
all.tap { |x| x.default_scoped = false }
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment