Sha256: d00f858f5ba371ba0a4070cc7f4bdbc82d0b0606fa13f7b0b01269184be39cc0

Contents?: true

Size: 436 Bytes

Versions: 6

Compression:

Stored size: 436 Bytes

Contents

module Admin::ProductGroupsHelper

  # Allow certain scope attributes to have a custom field type
  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

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_core-0.70.7 app/helpers/admin/product_groups_helper.rb
spree_core-0.70.6 app/helpers/admin/product_groups_helper.rb
spree_core-0.70.5 app/helpers/admin/product_groups_helper.rb
spree_core-0.70.4 app/helpers/admin/product_groups_helper.rb
spree_core-0.70.3 app/helpers/admin/product_groups_helper.rb
spree_core-0.70.2 app/helpers/admin/product_groups_helper.rb