Module: MoneyAttribute::AmountCondition
- Included in:
- QueryMethods
- Defined in:
- lib/money_attribute/query/amount_condition.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#resolve_amount_condition(attr, value) ⇒ ActiveRecord::Relation
Builds an amount filter for the registered money attribute.
Instance Method Details
#resolve_amount_condition(attr, value) ⇒ ActiveRecord::Relation
Builds an amount filter for the registered money attribute.
12 13 14 15 16 17 |
# File 'lib/money_attribute/query/amount_condition.rb', line 12 def resolve_amount_condition(attr, value) spec = money_attribute_spec!(attr) col = arel_table[spec.amount_col] where(build_amount_predicate(col, spec, value)) end |