Module: Workarea::Admin::ProductsHelper

Defined in:
app/helpers/workarea/admin/products_helper.rb

Instance Method Summary collapse

Instance Method Details

#format_variant_options(hash) ⇒ Object



3
4
5
6
7
8
# File 'app/helpers/workarea/admin/products_helper.rb', line 3

def format_variant_options(hash)
  hash.map do |name, value|
    joined = value.is_a?(Array) ? value.join(', ') : value
    "#{(:strong, name)}: #{joined}"
  end.join(', ').html_safe
end