I am having trouble with my first project in ruby on rails

Posted by Sebastian on Stack Overflow See other posts from Stack Overflow or by Sebastian
Published on 2010-05-10T13:03:57Z Indexed on 2010/05/10 13:34 UTC
Read the original article Hit count: 176

Filed under:
|
|
|

Here's my index action in the books controller: http://pastebin.com/XdtGRQKV

Here's the view for the action i just mentioned: http://pastebin.com/nQFy400m

Here's the result without being logged in: http://i.imgur.com/rQoiw.jpg

Here's the result when i'm logged in with the user 'admin': http://i.imgur.com/E1CUr.jpg

So the problem is that, in the view, before line 25 the 'user' variable seems to be empty ( or not loaded), and after line 25 the variable 'user' has the expected values.

I have tried initializing a variable in the index method of the books controller but get exactly the same results.

Thanks in advance!

BTW had to make the links text because of stackoverflow limit.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails