Module: HasEnumeration::AggregateConditionsOverride
- Defined in:
- lib/has_enumeration/aggregate_conditions_override.rb
Instance Method Summary collapse
-
#expand_hash_conditions_for_aggregates(attrs) ⇒ Object
Override the aggregate hash conditions behavior to coerce has_enumeration attributes that show up in finder options as symbols into instances of the aggregate class before hash expansion.
Instance Method Details
#expand_hash_conditions_for_aggregates(attrs) ⇒ Object
Override the aggregate hash conditions behavior to coerce has_enumeration attributes that show up in finder options as symbols into instances of the aggregate class before hash expansion.
6 7 8 9 10 11 12 13 14 |
# File 'lib/has_enumeration/aggregate_conditions_override.rb', line 6 def (attrs) = attrs.dup attr_enumeration_mapping_classes.each do |attr, klass| if [attr].is_a?(Symbol) [attr] = klass.from_sym([attr]) end end super() end |