mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use as_json instead of rails_to_json
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user