Skip to content

Commit

Permalink
Merge pull request rubysherpas#73 from littlebitselectronics/use_quot…
Browse files Browse the repository at this point in the history
…ed_table_name

Use quoted table name in default scope (call me paranoid)
  • Loading branch information
radar committed Oct 24, 2013
2 parents b23c08f + 984c8c0 commit 1dcf3b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paranoia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def self.acts_as_paranoid
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
Expand Down

0 comments on commit 1dcf3b4

Please sign in to comment.