Module: Admin::ProductGroupsHelper
- Defined in:
- app/helpers/admin/product_groups_helper.rb
Instance Method Summary collapse
-
#product_scope_field(product_scope, i) ⇒ Object
Allow certain scope attributes to have a custom field type.
Instance Method Details
#product_scope_field(product_scope, i) ⇒ Object
Allow certain scope attributes to have a custom field type
4 5 6 7 8 9 |
# File 'app/helpers/admin/product_groups_helper.rb', line 4 def product_scope_field(product_scope, i) value = (product_scope.arguments || [])[i] name = "product_group[product_scopes_attributes][][arguments][]" helper_method_for_scope = Scopes::Product::ATTRIBUTE_HELPER_METHODS[product_scope.name.to_sym] || :text_field_tag send(helper_method_for_scope, name, value) end |