Use as_json instead of rails_to_json

This commit is contained in:
Jeremy Kemper
2009-06-08 14:08:04 -07:00
parent 86fc43fd58
commit a6bf6f275c

View File

@@ -1176,7 +1176,7 @@ module ActionView
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 @@ module ActionView
true
end
def rails_to_json(*)
def as_json(options = nil)
@variable
end