Permalink
Browse files

Removing override for self.default_scope for the ActiveRecord::Base, …

…as it is not needed any more for the rails 3.2.
  • Loading branch information...
1 parent f852328 commit f7369ccc2a5cef79b78dfae351236837135eae03 @mirelabk mirelabk committed Apr 23, 2012
Showing with 10 additions and 9 deletions.
  1. +10 −9 lib/delete_softly.rb
View
19 lib/delete_softly.rb
@@ -72,12 +72,13 @@ def delete_softly(options = {:enforce => :without_deleted})
ActiveRecord::Base.send(:extend, DeleteSoftly::ARExtender)
# Overwrite ActiveRecord::Base#default_scope
-class ActiveRecord::Base
- # default_scope fix discussed in ticket:
- # https://rails.lighthouseapp.com/projects/8994/tickets/4583-merge-default-scopes-by-default#ticket-4583-11
- def self.default_scope(options = {})
- key = :"#{self}_scoped_methods"
- Thread.current[key] = nil
- self.default_scoping << construct_finder_arel(options, default_scoping.pop)
- end
-end
+#Override is not needed any more for the rails 3.2.
+#class ActiveRecord::Base
+# # default_scope fix discussed in ticket:
+# # https://rails.lighthouseapp.com/projects/8994/tickets/4583-merge-default-scopes-by-default#ticket-4583-11
+# def self.default_scope(options = {})
+# key = :"#{self}_scoped_methods"
+# Thread.current[key] = nil
+# self.default_scoping << construct_finder_arel(options, default_scoping.pop)
+# end
+#end

0 comments on commit f7369cc

Please sign in to comment.