Permalink
Browse files

Use as_json instead of rails_to_json

  • Loading branch information...
1 parent 86fc43f commit a6bf6f275c4fb25e5521faa148d2d2ea63a064b2 @jeremy jeremy committed Jun 8, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/prototype_helper.rb
@@ -1176,7 +1176,7 @@ def reload(options_for_replace = {})
class JavaScriptVariableProxy < JavaScriptProxy #:nodoc:
def initialize(generator, variable)
- @variable = variable
+ @variable = ActiveSupport::JSON::Variable.new(variable)
@empty = true # only record lines if we have to. gets rid of unnecessary linebreaks
super(generator)
end
@@ -1187,7 +1187,7 @@ def respond_to?(*)
true
end
- def rails_to_json(*)
+ def as_json(options = nil)
@variable
end

0 comments on commit a6bf6f2

Please sign in to comment.