Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

root/trunk/activesupport/lib/active_support/json/variable.rb

Revision 8013, 196 bytes (checked in by nzkoz, 11 months ago)

Add an ignored options parameter to ActiveSupport::JSON::Variable#to_json to make sure it duck-types nicely with the other JSON types. [Pascal Belloncle]

Line 
1 module ActiveSupport
2   module JSON
3     # A string that returns itself as its JSON-encoded form.
4     class Variable < String
5       def to_json(options=nil)
6         self
7       end
8     end
9   end
10 end
Note: See TracBrowser for help on using the browser.