rails 3 app in production raises 500 error when record not found? -
When I go to a bogus url:
/ posts / 99999999
On my local machine, I see:
Active Note: Showing # Notepad # Show in Posts # User / Patrick / Ariels / my_app / app / views / posts / show .html.haml where Row # 1 picked: The post with id = 99 999 could not be found
... log show:
Rendered post /show.html .haml 423ms ActionView :: Template :: error (with the id = 99 999 Posts can not be found) Full (29.6ms) / <> --- Wine That, when I do it in production, I get a public / 500.html error page, not 404 ... I'm confused because in the development mode, the browser shows ActiveRecord :: RecordNotFound (which means 404 , Yes?) But there is not a single mention of ActionView :: Template :: Error - ActiveRecord :: RecordNotFound
So, my question is, how can I do a 404 not a 500? And - why is this 500?
What I've seen, Rail automatically runs an ActiveRecord :: Record Notephone 404.html Presented to me ... I found out the problem I am using civilized civilization, and due to the nature of this lazy load, it causes an error in view instead of the controller, and hence the presentation of the rail 404 page Do not know about this because it is a real ActionView :: Template :: Error ... Shows
Comments
Post a Comment