Forum: Ruby on Rails One url with multiple controllers

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.
TomRossi7 (Guest)
on 2009-05-28 00:32
(Received via mailing list)
Lets say that I want to have one url that can map to two different
controllers.  For example /posts could map to controller 'public/
posts' or to the controller 'admin/posts' based on whether or not the
user has logged in.  This isn't a great example because I could just
use '/admin/posts', but in my scenario the url has to be the same.

I was hoping to use a before_filter to either render one action or the
other.  It looks like render_component would have let me accomplish
this, but it has been deprecated.

Thanks!
Tom
This topic is locked and can not be replied to.