Permalink
Browse files

rails 2 3 block helper upgrade

  • Loading branch information...
1 parent 031c01c commit aa47046108ecf8dc356578d5eb88159e4ebe2923 Eric Knudtson committed Nov 27, 2011
Showing with 8 additions and 3 deletions.
  1. +8 −3 lib/abingo_view_helper.rb
View
@@ -13,13 +13,18 @@ def ab_test(test_name, alternatives = nil, options = {}, &block)
else
choice = Abingo.test(test_name, alternatives, options)
end
-
+
if block
- content_tag = capture(choice, &block)
- block_called_from_erb?(block) ? concat(content_tag) : content_tag
+ capture(choice, &block)
else
choice
end
+ #if block
+ # content_tag = capture(choice, &block)
+ # block_called_from_erb?(block) ? concat(content_tag) : content_tag
+ #else
+ # choice
+ #end
end
def bingo!(test_name, options = {})

0 comments on commit aa47046

Please sign in to comment.