This project is archived and is in readonly mode.

#2589 ✓resolved
ransom-briggs (at uiowa)

render :json => nil

Reported by ransom-briggs (at uiowa) | April 30th, 2009 @ 10:42 PM | in 2.x

render :json => nil causes render to ignore :json

in actionpack/lib/action_controller/base.rb line 954 evaluates to false - this ends up failing out with a could not find method.erb error

 954           elsif json = options[:json]
 955             json = json.to_json unless json.is_a?(String)
 956             json = "#{options[:callback]}(#{json})" unless options[:callback].blank?
 957             response.content_type ||= Mime::JSON
 958             render_for_text(json, options[:status])
 960           elsif options[:partial]

attached a test which fails

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>


Referenced by