2012-05-21 38 views
0

我想使用虛榮的鐵軌。我ab_test /rag_price_options.rb文件是:使用圖像作爲虛榮的替代品

ab_test "Rag price options" do 
     description "Different options for displaying the rag price" 
     alternatives "banner_194x117_rag.png", "ccp_logo_bk.png" 
     metrics :orders 
    end 

和我的度量指標/ order.rb是:

metric "Orders" do 
    description "Measures number of orders, subtotals, order number" 
    end 

但我試圖找出如何有2個圖像作爲替代品需要走的內部鏈接到現場是這樣的:

<%= link_to image_tag("banner_194x117_rag.png", :alt=>'Free Rag with purchase over $99!', :width=>194, :height=>117, :style=>'display:block', :class=>'incentive'), "/blog/free-cheap-cycle-rag" %> 

回答

0

所有我要做的就是:

<%= link_to image_tag(ab_test(:rag_price_options), :alt=>'Free Rag with purchase over $99!', :width=>194, :height=>117, :style=>'display:block', :class=>'incentive'), "/blog/free-cheap-cycle-rag" %>