Routing, need fast help

Hi, I try to do with my app something like twitter.com has, when you
are NOT logged in it shows twitter.com, when you are logged in it
keeps the same domain name in browser, but all page has been
changed(it’s full with tweets), anybody? How to do this?

On 10 Aug 2010, at 13:10, Ainar A. [email protected]
wrote:

Hi, I try to do with my app something like twitter.com has, when you
are NOT logged in it shows twitter.com, when you are logged in it
keeps the same domain name in browser, but all page has been
changed(it’s full with tweets), anybody? How to do this?

You could just use an if statement in the controller action:

if logged_in?

set up logged-in stuff

render :action => ‘some_template’
else

set up not-logged-in stuff

render :action => ‘some_other_template’
end

Replace #logged_in? with whatever’s appropriate for your authentication
system.

Chris

Thanks very fast and useful answer, again Thanks

BTW does anyone know place where to look for templates?