Re: User Login

cz231
Tue, 03 Jun 2008 01:52:18 -0000

Oops, sorry about that, I accidentally sent it somehow...

Anyway, for the <% if session[:uid] = @user.id -%> , I don''t know
what
would go in there...

Thanks for your help...

On Jun 2, 8:50 pm, cz231 <cz2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
> Hi,
> I''m creating a website with Ruby on Rails, that has a user account
> feature. On the side bar, I have a login form. But if the user logs
> in, I want it to no display the user login form, but rather hello
> user_name. I am guessing I would set up a if statement, perhaps like
> this?
>
> <% if session[:uid] = @user.id -%>
>
> <% else -%>
>
> Login Form
>     <% end %>