I am using Abingo to do ABtesting on my website. So it can generate different view开发者_如何学Cs as A and B. But all examples I find are using .erb, like this:
<% ab_test("signup_title", ["Sign up", "Registration", "Free Sign up"], :conversion => "signup") do |signup_title| %> <% title "Free Sign up" %> <% end %>
Can I use ABingo to switch views in .haml? If so, what syntax should I use?
Thanks a lot.
The conversion to HAML for your example is:
- ab_test("signup_title", ["Sign up", "Registration", "Free Sign up"], :conversion => "signup") do |signup_title|
- title "Free Sign up"
I assume you as following the ABingo Railscast. Just be aware that these screencasts use the Nifty Layout generator and have a title
method.
精彩评论