<commit_before>%h1 Show Product
%p#notice
  = notice
%table
  %tr
    %td
      %b Name
    %td
      = @product.name
  %tr
    %td
      %b Details
    %td
      = @product.details

-# %td= image_tag @product.master_variant.first.multimedia.first.file.url(:thumb)

- if !@product.product_properties.empty?
  %h3 Properties
  %table{:border => 1}
    - @product.product_properties.each do |p|
      %tr
        %td= p.property.display_name
        %td= p.value
    %tr
      %td= "Brand"
      %td= @product.brand

- if !@product.variants_without_master.empty?
  %h3 Variants
  - @product.variants_without_master.each do |v|
    %table{border: 1}
      - v.variant_property_values.each do |vpv|
        %tr
          %td= vpv.variant_property.display_name
          %td= vpv.presentation
    = add_to_cart_form(v.id)
    /= link_to 'Add to cart', cart_add_path(v.id), method: :post
- else
  = add_to_cart_form(@product.master_variant.id)
  /= link_to 'Add to cart', cart_add_path(@product.master_variant.id), method: :post

= link_to 'Back', products_path<commit_msg>deleted old code<commit_after>%h1 Show Product
%p#notice
  = notice
%table
  %tr
    %td
      %b Name
    %td
      = @product.name
  %tr
    %td
      %b Details
    %td
      = @product.details

-# %td= image_tag @product.master_variant.first.multimedia.first.file.url(:thumb)

- if !@product.product_properties.empty?
  %h3 Properties
  %table{:border => 1}
    - @product.product_properties.each do |p|
      %tr
        %td= p.property.display_name
        %td= p.value
    %tr
      %td= "Brand"
      %td= @product.brand

- if !@product.variants_without_master.empty?
  %h3 Variants
  - @product.variants_without_master.each do |v|
    %table{border: 1}
      - v.variant_property_values.each do |vpv|
        %tr
          %td= vpv.variant_property.display_name
          %td= vpv.presentation
    = add_to_cart_form(v.id)
- else
  = add_to_cart_form(@product.master_variant.id)

= link_to 'Back', products_path
{'fraction_non_alphanumeric': 0.12984398590840462, 'fraction_numerical': 0.0050327126321087065, 'mean_word_length': 2.6814814814814816, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2549394', 'n_tokens_mistral': 741, 'n_tokens_neox': 735, 'n_words': 141}