Sha256: fef96915943a9d486fc217e449f7e5230a2e5bf200751fa3512a2bba1227a009

Contents?: true

Size: 802 Bytes

Versions: 29

Compression:

Stored size: 802 Bytes

Contents

module Admin::ProductPropertiesHelper

  # Generates the appropriate field name for attribute_fu.  Normally attribute_fu handles this but we've got a
  # special case where we need text_field_with_autocomplete and we have to recreate attribute_fu's naming
  # scheme manually.
  def property_fu_name(product_property, number)
    if product_property.new_record?
      "product[product_property_attributes][new][#{number}][property_name]"
    else
      "product[product_property_attributes][#{product_property.id}][property_name]"
    end
  end

  def property_fu_value(product_property, number)
    if product_property.new_record?
      "product[product_property_attributes][new][#{number}][value]"
    else
      "product[product_property_attributes][#{product_property.id}][value]"
    end
  end
end

Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
spree_core-0.70.7 app/helpers/admin/product_properties_helper.rb
spree_core-0.70.6 app/helpers/admin/product_properties_helper.rb
apispree_core-0.0.0 app/helpers/admin/product_properties_helper.rb
My-Commerce_core-1.1.0 app/helpers/admin/product_properties_helper.rb
My-Commerce_core-1.0.0 app/helpers/admin/product_properties_helper.rb
MyCommerceapi-1.0.0 core/app/helpers/admin/product_properties_helper.rb
MyCommerce-0.0.3 core/app/helpers/admin/product_properties_helper.rb
rfcommerce_core-0.0.3 app/helpers/admin/product_properties_helper.rb
spree_core-0.60.6 app/helpers/admin/product_properties_helper.rb
spree_core-0.70.5 app/helpers/admin/product_properties_helper.rb
spree_core-0.70.4 app/helpers/admin/product_properties_helper.rb
spree_core-0.60.5 app/helpers/admin/product_properties_helper.rb
spree_core-0.70.3 app/helpers/admin/product_properties_helper.rb
spree_core-0.70.2 app/helpers/admin/product_properties_helper.rb
spree_core-0.50.4 app/helpers/admin/product_properties_helper.rb
spree_core-0.60.4 app/helpers/admin/product_properties_helper.rb
spree_core-0.50.3 app/helpers/admin/product_properties_helper.rb
spree_core-0.60.3 app/helpers/admin/product_properties_helper.rb
spree_core-0.70.1 app/helpers/admin/product_properties_helper.rb
spree_core-0.70.0 app/helpers/admin/product_properties_helper.rb