Rails way for creating "sorry no page found" for bad urls?


#1

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.


#2

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.