Commit 984c8c09 by Sean O'Hara

Use quoted table name in default scope (call me paranoid)

parent ebec99ba
......@@ -66,7 +66,7 @@ class ActiveRecord::Base
alias :destroy! :destroy
alias :delete! :delete
include Paranoia
default_scope { where(:deleted_at => nil) }
default_scope { where(self.quoted_table_name + '.deleted_at IS NULL') }
end
def self.paranoid? ; false ; 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