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.
633ada55ad6d9831e08a6ae23270baf4?d=identicon&s=25 mixplate (Guest)
on 2007-05-23 05: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.
72eb65fa089082d3bd8b38a5596ad331?d=identicon&s=25 Keynan Pratt (keynan)
on 2007-05-23 06: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.