Commit 30bd31a1 by delba

use where.not

parent 56e1df53
......@@ -7,7 +7,7 @@ module Paranoia
def paranoid? ; true ; end
def only_deleted
all.tap { |x| x.default_scoped = false }.where("#{self.table_name}.deleted_at is not null")
all.tap { |x| x.default_scoped = false }.where.not(deleted_at: nil)
end
def with_deleted
......
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