Sha256: 0b5bc57a7609a12337ab5c74b2a2acf707424da7994343407e353c5a8b59ebff

Contents?: true

Size: 438 Bytes

Versions: 9

Compression:

Stored size: 438 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

9 entries across 9 versions & 1 rubygems

Version Path
spree_core-0.30.2 app/helpers/admin/product_groups_helper.rb
spree_core-0.40.4 app/helpers/admin/product_groups_helper.rb
spree_core-0.40.3 app/helpers/admin/product_groups_helper.rb
spree_core-0.40.2 app/helpers/admin/product_groups_helper.rb
spree_core-0.40.1 app/helpers/admin/product_groups_helper.rb
spree_core-0.40.0 app/helpers/admin/product_groups_helper.rb
spree_core-0.30.1 app/helpers/admin/product_groups_helper.rb
spree_core-0.30.0 app/helpers/admin/product_groups_helper.rb
spree_core-0.30.0.beta1 app/helpers/admin/product_groups_helper.rb