Forum: Ruby on Rails rails way for creating "sorry no page found" for bad urls?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
mixplate (Guest)
on 2007-05-23 07:27
hi,
other than brute forcing my way in creating render => 'no page found'
for every action that returns a nil variable, is there a rails way to
creating a no page found for when someone decided to try random urls?


thnaks.
Keynan P. (Guest)
on 2007-05-23 08:15
mixplate wrote:
> hi,
> other than brute forcing my way in creating render => 'no page found'
> for every action that returns a nil variable, is there a rails way to
> creating a no page found for when someone decided to try random urls?
>
>
> thnaks.

note the 404.html file in the public directory

if you use routes properly it will take care of itself.
This topic is locked and can not be replied to.