Commit 1dcf3b4b by Ryan Bigg

Merge pull request #73 from littlebitselectronics/use_quoted_table_name

Use quoted table name in default scope (call me paranoid)
parents b23c08fe 984c8c09
......@@ -67,7 +67,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