Skip to content
Browse files

explicitly specifying the table name on the scoping of _destroyed_onl…

…y methods to prevent confusion in ActiveScaffold and other places (thanks vibepi)
  • Loading branch information...
1 parent ddfe338 commit 60f622f3a8b1af389ce13a51604190f462c359e2 Jeffrey Chupp committed Mar 31, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/is_paranoid.rb
View
2 lib/is_paranoid.rb
@@ -86,7 +86,7 @@ def self.method_missing name, *args
# end
define_method name do |*args|
self.with_exclusive_scope do
- with_scope({:find => { :conditions => ["#{destroyed_field} IS NOT ?", field_not_destroyed] }}) do
+ with_scope({:find => { :conditions => ["#{self.table_name}.#{destroyed_field} IS NOT ?", field_not_destroyed] }}) do
self.send($1, *args)
end
end

0 comments on commit 60f622f

Please sign in to comment.
Something went wrong with that request. Please try again.