Returns an object whose #to_json evaluates to code. Use this to pass a literal JavaScript expression as an argument to another JavaScriptGenerator method.
Source Code
# File action_view/helpers/prototype_helper.rb, line 671 def literal(code) ActiveSupport::JSON::Variable.new(code.to_s) end
<code/>and<pre/>for code samples.