<commit_before>%h1 #{@store.name}
- unless @store.products.empty?
  - @store.products.each do |product|
    .product-widget
      = product.name
      = image_tag(product.photos_array.first, :alt => product.name)
      = product.description
      %p.widget
        Price: #{number_to_currency(product.price)}
      %p.widget
        - unless product.flatrate_shipping_cost.nil?
          Shipping: #{number_to_currency(product.flatrate_shipping_cost)}
      %p.widget
        - unless product.sizes.nil?
          Sizes: #{product.sizes}
      %p.widget
        - unless product.colors.nil?
          Colors: #{product.colors}
      %span.product-count
        = product.photos_array.length
      = link_to('Edit', edit_store_product_path(@store, product), :class => 'edit-product')
      .widget
        = link_to('View', store_product_path(@store, product))
        = link_to('Edit', edit_store_product_path(@store, product))
        = link_to('Delete', {:controller => 'products', :action => 'destroy', :product => product, :store => @store}, :data => { :confirm =>"Are you sure you want to delete #{product.name}?" }, :method => :delete)

= link_to('add product', new_store_product_path(@store))
<commit_msg>only attempting to render product image on stores#show if photos_array isnt empty<commit_after>%h1 #{@store.name}
- unless @store.products.empty?
  - @store.products.each do |product|
    .product-widget
      = product.name
      - unless product.photos_array.empty?
        = image_tag(product.photos_array.first, :alt => product.name)
      %p.widget
        = product.description
      %p.widget
        Status: #{product.status}
      %p.widget
        Price: #{number_to_currency(product.price)}
      %p.widget
        - unless product.flatrate_shipping_cost.nil?
          Shipping: #{number_to_currency(product.flatrate_shipping_cost)}
      %p.widget
        - unless product.sizes.nil?
          Sizes: #{product.sizes}
      %p.widget
        - unless product.colors.nil?
          Colors: #{product.colors}
      %span.product-count
        = product.photos_array.length
      = link_to('Edit', edit_store_product_path(@store, product), :class => 'edit-product')
      .widget
        = link_to('View', store_product_path(@store, product))
        = link_to('Edit', edit_store_product_path(@store, product))
        = link_to('Delete', {:controller => 'products', :action => 'destroy', :product => product, :store => @store}, :data => { :confirm =>"Are you sure you want to delete #{product.name}?" }, :method => :delete)

= link_to('add product', new_store_product_path(@store))

{'fraction_non_alphanumeric': 0.14510556621881, 'fraction_numerical': 0.0007677543186180423, 'mean_word_length': 3.0782472613458527, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '3604436', 'n_tokens_mistral': 797, 'n_tokens_neox': 791, 'n_words': 155}