Skip to content

Commit

Permalink
Refactor AnalyticsHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
Trung Lê committed Jun 30, 2012
1 parent 65e3a7e commit eae5c7f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dash/app/helpers/spree/analytics_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def product_analytics_tags
{ :product => { :name => @product.name,
:price => @product.price,
:sku => @product.sku,
:categories => @product.taxons.map { |t| t.permalink }
:categories => @product.taxons.map(&:permalink)
}
}
end
Expand Down Expand Up @@ -56,11 +56,12 @@ def completed_analytics_tags
def products_for_order
@order.line_items.map do |line_item|
variant = line_item.variant
{ :name => variant.name,
{
:name => variant.name,
:qty => line_item.quantity,
:price => variant.price,
:sku => variant.sku,
:categories => variant.product.taxons.map { |t| t.permalink }
:categories => variant.product.taxons.map(&:permalink)
}
end
end
Expand Down

0 comments on commit eae5c7f

Please sign in to comment.