Rails Partial rendering results in a blank page?

I was stuck with an error at the moment that puzzled me. I have a layout containing some HTML and partial (for navigation) - there is nothing more than a crop.

  • If nav is turned on as partial, I return nothing to the browser (blank page), but everything else looks fine.
  • If I delete the partial, the page works fine
  • If I put the navigation code directly in the template, it works fine
  • If I replace the navigation code in a partial simple string, I will get a blank page.

Does anyone have any ideas on what might be the problem, or do you know how I can debug it?

+3
source share
3 answers

, , .

Rails ActionView:: MissingTemplate Exception , , , .

+1

, , , . :

  • ,
  • , .
  • , , ( )
  • , ,
0

. - ( </div> <div>, , ). , , , , - (, , CSS, ). , , , .

, - ( Unicorn) . Running Ruby 1.9.3, Rails 3.1.3. SASS Unicorn.

UPDATE: It has just been determined that Rails returns a 304-unmodified, based on the "If-none-match" header sent by my browser (which, in turn, was based on the ETAG of the previous page). However, at the same time, the browser cleared the window. So, presumably, something about what Rails sent made the browser clear the window.

0
source

Source: https://habr.com/ru/post/1706054/


All Articles