Sha256: 9da3e57a8eda31a70d516f2061ec4e80d679b2a726704a7664debb5d302bf4b5
Contents?: true
Size: 969 Bytes
Versions: 36
Compression:
Stored size: 969 Bytes
Contents
module Spree module Admin module ProductsHelper def taxon_options_for(product) options = @taxons.map do |taxon| selected = product.taxons.include?(taxon) content_tag(:option, value: taxon.id, selected: ('selected' if selected)) do (taxon.ancestors.pluck(:name) + [taxon.name]).join(" -> ") end end safe_join(options) end def option_types_options_for(product) @option_types.map do |option_type| selected = product.option_types.include?(option_type) content_tag(:option, value: option_type.id, selected: ('selected' if selected)) do option_type.name end end safe_join(options) end def show_rebuild_vat_checkbox? Spree::TaxRate.included_in_price.exists? end end end end
Version data entries
36 entries across 36 versions & 1 rubygems