Module: Searchlogic::ActiveRecord::AssociationProxy
- Included in:
- ActiveRecord::Associations::AssociationProxy
- Defined in:
- lib/searchlogic/active_record/association_proxy.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
4 5 6 7 8 |
# File 'lib/searchlogic/active_record/association_proxy.rb', line 4 def self.included(klass) klass.class_eval do alias_method_chain :send, :searchlogic end end |
Instance Method Details
#send_with_searchlogic(method, *args) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/searchlogic/active_record/association_proxy.rb', line 10 def send_with_searchlogic(method, *args) if !proxy_respond_to?(method) && !proxy_reflection.[:polymorphic] && proxy_reflection.klass.condition?(method) proxy_reflection.klass.send(method, *args) else send_without_searchlogic(method, *args) end end |