Also, don't forget to pass the HTTP status code:
render :status=> 500, :file => File.join(.....

BUT! Rails will render 500 error page for you, but only on the remote
server,
in the rails sources there is a check if you send a request from the
local pc, it renders trace code to you,
and if you make request from remote PC it will render public/500.html
page for you, without any customizations.

On Dec 3, 2:56 pm, Amit Tomar <li...@ruby-forum.com> wrote:
> Jeremy Woertink wrote in post #965835:
>
> > I don't remember how the rendering was in Rails 2.2.2, but this is how
> > I'm doing it in my Rails 2.3.5+ apps
>
> > render :file => File.join(Rails.root, 'public', '500.html'
>
> > You might need :layout => false
>
> > ~Jeremy
>
> Thanks for ur response Jeremy ..
>
> am running my application in development mode but soon i switch to
> production mode i got what i required without any change ...
>
> means my application able to redirect to error page(500.html) as soon as
> switch to production mode...
>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to