On 10 Aug 2010, at 13:10, Ainar Abramovich <[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 -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

