Commit f69132e2 by Ryan Bigg

Include table name in query for only_deleted

Fixes #27
parent 131cb29d
...@@ -7,8 +7,9 @@ module Paranoia ...@@ -7,8 +7,9 @@ module Paranoia
def paranoid? ; true ; end def paranoid? ; true ; end
def only_deleted def only_deleted
scoped.tap { |x| x.default_scoped = false }.where("deleted_at is not null") scoped.tap { |x| x.default_scoped = false }.where("#{self.table_name}.deleted_at is not null")
end end
def with_deleted def with_deleted
scoped.tap { |x| x.default_scoped = false } scoped.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