Module: Admin::ProductsHelper
- Defined in:
- app/helpers/admin/products_helper.rb
Instance Method Summary collapse
- #exclusive_properties(product, properties) ⇒ Object
- #option_type_select(so) ⇒ Object
- #pv_tag_id(product_value) ⇒ Object
Instance Method Details
#exclusive_properties(product, properties) ⇒ Object
12 13 14 15 16 17 |
# File 'app/helpers/admin/products_helper.rb', line 12 def exclusive_properties(product, properties) product.property_values.each do |pv| properties.delete(pv.property) end properties end |
#option_type_select(so) ⇒ Object
2 3 4 5 6 |
# File 'app/helpers/admin/products_helper.rb', line 2 def option_type_select(so) select(:new_variant, so.option_type.presentation, so.option_type.option_values.collect {|ov| [ ov.presentation, ov.id ] }) end |
#pv_tag_id(product_value) ⇒ Object
8 9 10 |
# File 'app/helpers/admin/products_helper.rb', line 8 def pv_tag_id(product_value) "product-property-value-#{product_value.id}" end |