[Rails] Re: Routing, need fast help
Thanks very fast and useful answer, again Thanks
On Aug 10, 3:16 pm, Chris Mear <chrism...@gmail.com> wrote:
> On 10 Aug 2010, at 13:10, Ainar Abramovich <youhubcommun...@gmail.com> 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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home