Module: Searchlogic::NamedScopes::AssociationConditions
- Included in:
- ActiveRecord::Base
- Defined in:
- lib/searchlogic/named_scopes/association_conditions.rb
Overview
Handles dynamically creating named scopes for associations. See the README for a detailed explanation.
Instance Method Summary collapse
-
#condition?(name) ⇒ Boolean
:nodoc:.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object (private)
14 15 16 17 18 19 20 21 |
# File 'lib/searchlogic/named_scopes/association_conditions.rb', line 14 def method_missing(name, *args, &block) if !local_condition?(name) && details = association_condition_details(name) create_association_condition(details[:association], details[:condition], args) send(name, *args) else super end end |
Instance Method Details
#condition?(name) ⇒ Boolean
:nodoc:
5 6 7 |
# File 'lib/searchlogic/named_scopes/association_conditions.rb', line 5 def condition?(name) # :nodoc: super || association_condition?(name) end |