Module: Rails::Sharding::ActiveRecordExtensions::CaseFixer

Defined in:
lib/rails/sharding/active_record_extensions.rb

Overview

Fixes case when behavior when ScopeProxy is passed to case (otherwise classes don’t match)

Instance Method Summary collapse

Instance Method Details

#===(other) ⇒ Object



84
85
86
87
# File 'lib/rails/sharding/active_record_extensions.rb', line 84

def ===(other)
  other = other.original_scope while other === ScopeProxy
  super
end