Permalink
Browse files

made it work properly on 3

  • Loading branch information...
1 parent 1816de5 commit 4f918e67d5e40c16cab094e556b02a62d9ac136a @ebertech committed Nov 27, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/backbone/bootstrapper/helper.rb
@@ -30,7 +30,8 @@ def bootstrap_backbone(key, object, template, type = nil)
private
def with_javascript_tag(&block)
- (@template || view_context).javascript_tag do
+ context = @template.respond_to?(:javascript_tag) ? @template : view_context
+ context.javascript_tag do
result = block.call
if result.respond_to?(:html_safe)
result.html_safe

0 comments on commit 4f918e6

Please sign in to comment.