Displaying 1 result from an estimated 1 matches for "give_me_json".
2006 May 27
5
ActiveSupport JSON working?
...that could go in place of ''bar'' or ''rez'' that will
break the to_json method? I am using a very long string from rjs
output in place of ''bar''.
Perhaps .to_json is not ready yet?
Thanks,
Peter
def MyController < ApplicationController
def give_me_json
# make sure not to send html but text/plain
@headers["Content-Type"] = "text/plain; charset=utf-8"
data = { :foo => ''bar'', :etc => ''rez'' }
render_text data.to_json
end
end