Class: ActiveRecord::Base
- Inherits:
-
Object
- Object
- ActiveRecord::Base
- Defined in:
- lib/delete_softly.rb
Overview
Overwrite ActiveRecord::Base#default_scope
Class Method Summary collapse
-
.default_scope(options = {}) ⇒ Object
default_scope fix discussed in ticket: rails.lighthouseapp.com/projects/8994/tickets/4583-merge-default-scopes-by-default#ticket-4583-11.
Class Method Details
.default_scope(options = {}) ⇒ Object
default_scope fix discussed in ticket: rails.lighthouseapp.com/projects/8994/tickets/4583-merge-default-scopes-by-default#ticket-4583-11
79 80 81 82 83 |
# File 'lib/delete_softly.rb', line 79 def self.default_scope( = {}) key = :"#{self}_scoped_methods" Thread.current[key] = nil self.default_scoping << construct_finder_arel(, default_scoping.pop) end |