14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'app/controllers/spree/products_controller.rb', line 14
def show
return unless @product
@variants = @product.variants_including_master.active(current_currency).includes([:option_values, :images])
@product_properties = @product.product_properties.includes(:property)
referer = request.env['HTTP_REFERER']
if referer
begin
referer_path = URI.parse(request.env['HTTP_REFERER']).path
rescue URI::InvalidURIError
else
if referer_path && referer_path.match(/\/t\/(.*)/)
@taxon = Taxon.find_by_permalink($1)
end
end
end
end
|