On Feb 4, 9:23 am, redhotberry <redhotbe...@gmail.com> wrote:
> Hello. How to check presence of object in DB in routes? If object
> exists in DB - rais app shows its page, if not - it redirects to 404.
> I know that it's possible to do all this logic in controller but i
> would to know how to do it in routes.

I don't think you can. Routes map urls to controllers & actions -
that's it.

Fred

-- 
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-talk@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