Skip to content

Commit

Permalink
use _path' instead of _url' on `products' partial
Browse files Browse the repository at this point in the history
  • Loading branch information
mauazua committed Jun 24, 2016
1 parent 62f97b8 commit 9d2c0d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/app/views/spree/shared/_products.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<% if products.any? %>
<div id="products" class="row" data-hook>
<% products.each do |product| %>
<% url = spree.product_url(product, taxon_id: @taxon.try(:id)) %>
<% url = spree.product_path(product, taxon_id: @taxon.try(:id)) %>
<div id="product_<%= product.id %>" class="col-md-3 col-sm-6 col-xs-6 product-list-item" data-hook="products_list_item" itemscope itemtype="https://schema.org/Product">
<div class="panel panel-default">
<% cache(@taxon.present? ? [I18n.locale, current_currency, @taxon, product] : cache_key_for_product(product)) do %>
Expand Down
2 changes: 1 addition & 1 deletion frontend/spec/features/products_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
end

it "correctly displays the product url via microdata" do
expect(ringer.properties["url"]).to eq ["http://www.example.com/products/ruby-on-rails-ringer-t-shirt"]
expect(ringer.properties["url"]).to eq ["/products/ruby-on-rails-ringer-t-shirt"]
end
end

Expand Down

0 comments on commit 9d2c0d6

Please sign in to comment.