in my controller I use following code to render json.
render :json => @product, :callback => params[:callback]
I would expect (for example) following to be rendered:
Instead, it renders:
Notice the square brackets which disables $.parseJSON (jQuery) from
Don’t you know what am I doing wrong? How can I get rid of those
brackets? When I tried ActiveSupport::JSON.encode() there were no
Thank you very much,