Module: ProductGroupSearch::CoreFieldStrategy
- Defined in:
- lib/nimbleshop/product_group_search/core_field_strategy.rb
Instance Method Summary collapse
- #field_type ⇒ Object
- #join(proxy) ⇒ Object
- #localized_name ⇒ Object
- #query_column ⇒ Object
- #target_table ⇒ Object
Instance Method Details
#field_type ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/nimbleshop/product_group_search/core_field_strategy.rb', line 18 def field_type # TODO megpha why special treatment to :price field if query_column == :price 'number' else 'text' end end |
#join(proxy) ⇒ Object
3 4 5 |
# File 'lib/nimbleshop/product_group_search/core_field_strategy.rb', line 3 def join(proxy) proxy end |
#localized_name ⇒ Object
27 28 29 |
# File 'lib/nimbleshop/product_group_search/core_field_strategy.rb', line 27 def localized_name self.name end |
#query_column ⇒ Object
14 15 16 |
# File 'lib/nimbleshop/product_group_search/core_field_strategy.rb', line 14 def query_column self.name.try(:to_sym) end |
#target_table ⇒ Object
7 8 9 10 11 12 |
# File 'lib/nimbleshop/product_group_search/core_field_strategy.rb', line 7 def target_table unless @_target @_target = Product.arel_table end @_target end |