Does to_json require parameters? what about within rails?
I started getting the error "wrong number of arguments (0 for 1)" when doing myhash.to_json
Unfortunately I'm not sure when this error started happening, but I guess it relates to some versions of either rails or the json gem. I suppose my code (in a rails controller) is using the ActiveSupport::JSON version of to_json, rather than the to_josn method supported by the json gem. ActiveSupport::JSON vs JSON
In environment.rb I have
RAILS_GEM_VERSION = '2.3.2'
and also
config.gem "json", :version=> '1.1.7'
It's just a simple hash structure containing primitives which I want to convert in my controller, and it was working, but now I can't seem to run to_json without passing parameters.