From: Ken Fettig Date: 2005-09-15T12:56:34+09:00 Subject: Re: RoR sessions Thank you very much for the help. Could you point me to some good info on eruby? Thanks again Ken "balcer" wrote in message news:dg3o0j$pcg$1@portraits.wsisiz.edu.pl... > Ken Fettig napisa�(a): >> Hello, how do I access session values from a view in Rails? I have tried >> <%= >> #{@session[:user].userid'} but this causes a Rails error when it tries to >> render the View. How do I code this correctly? >> >> Thanks much >> Ken >> kenfettig@btinet.net >> >> > I have no becouse I'am at work now and can not check it. > > 1) all code that is between <% %> is just a ruby code > so <%=session[:user].userid%> would be better idea > > 2) #{@session[:user].userid' - what is ' on the end of line - this for > sure will give you and error > > 3) #{some_value} this one you use only inside string so > <% > years=10 > %> >

#{years.to_s}

> > Cheers, Jacek > P.S. I see that you should read a little bit more about eruby.