Note that there are some explanatory texts on larger screens.

plurals
  1. PORails AJAX request 500 Internal Server Error details
    primarykey
    data
    text
    <p>I have a form partial as follows:</p> <p><strong>_internet_service_form.html.erb</strong></p> <pre><code>&lt;%= simple_form_for @internet_service, remote: true do |f| %&gt; &lt;%= f.input :start_date %&gt; &lt;%= f.button :submit %&gt; &lt;% end %&gt; </code></pre> <p>When I render it in the new action of the controller, it returns a 500 internal server with no further explanation.</p> <p>When I render it in the edit action of the controller, it renders correctly.</p> <p>If I replace the partial with a text block with no rails tags in it, it renders correctly, so I know it's not a routing error.</p> <p><strong>new.js.erb</strong></p> <pre><code>$("#result-content").html("&lt;%= escape_javascript(render(partial: 'new')) %&gt;"); </code></pre> <p><strong>new.html.erb</strong></p> <pre><code>&lt;%= render partial: 'internet_service_form' %&gt; </code></pre> <p><strong>internet_service_controller.rb</strong></p> <pre><code>def new @internet_service = InternetService.new end def edit @internet_service = InternetService.find(params[:id]) end </code></pre> <p>These actions are being performed through AJAX, and the most useful logs I'm getting out of the development log are:</p> <pre><code>Started POST "/accounts/29/internet_services/new.js" for 10.12.68.100 at 2013-02-13 00:28:11 +1300 Processing by InternetServicesController#new as JS ... snip ... Rendered internet_services/_internet_service_form.html.erb (14.9ms) Rendered internet_services/_new.html.erb (24.3ms) Rendered internet_services/new.js.erb (32.2ms) Completed 500 Internal Server Error in 231ms </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload