diff --git a/app/controllers/products_controller.rb b/app/controllers/products_controller.rb index 1bfaf84..ab37ef3 100644 --- a/app/controllers/products_controller.rb +++ b/app/controllers/products_controller.rb @@ -1,6 +1,12 @@ class ProductsController < ApplicationController respond_to :js def show - respond_with(@product = Product.find(params[:id])) + respond_to do |format| + format.js {@product = Product.find(params[:id])} + format.html { + product = Product.find(params[:id]) + redirect_to store_url(product.store, :product_id => product.id) + } + end end end \ No newline at end of file