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