First, an example of what I'm trying to do:
- If you go to http://www.meetup.com and you are not signed in, you see a page that shows 'Do something • Learn something...' etc. which is a public page
- But when you are logged in, that same page (URL) shows 'Welcome, xxx...Whats happening...' etc. which is specific to you.
That is what I'm trying to do in my app as well.
How to go about this in Rails 2.3.8?
So far, I have:
- An
AboutsController
intended to serve up semi-static pages (wish the About wasn't plural!) - Root route is
map.root => :controller => "about"
.
Now, when a non-logged-in-user goes to the http://www.abc.com
, he would get the contents of the view about/index
. So far so good.
But, when a user is logged in, I want that the products/index
view should be displayed for the same URL i.e. http://www.example.com
URL (and not http://www.example.com/products
)
Is this possible in Rails 2.3.8?