Camping: Return user to recent entries, but keep errors

Posted by echoback on Stack Overflow See other posts from Stack Overflow or by echoback
Published on 2010-04-11T20:15:12Z Indexed on 2010/04/11 20:33 UTC
Read the original article Hit count: 127

Filed under:
|
|

Users can view a specific entry in my webapp with a URL. /entry/8, for example. If an entry doesn't exist, "Entry not found" gets appended to @messages and I render an error page.

I'd like to redirect the user to /recent, but I can't figure out a good way to keep the error message around to be displayed. There are other actions that need to take place in the Recent controller, so I can't just duplicate the query and render :posts.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails