Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rails 2 3 block helper upgrade

  • Loading branch information...
commit aa47046108ecf8dc356578d5eb88159e4ebe2923 1 parent 031c01c
Eric Knudtson authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 lib/abingo_view_helper.rb
View
11 lib/abingo_view_helper.rb
@@ -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 = {})
Please sign in to comment.
Something went wrong with that request. Please try again.