Hi, Rails 2.3.3 + restful_authentication.
current_user is a method from lib/authenticated_system.rb through "include AuthenticatedSystem" in application_controller.rb -------- home/_current_user.pl.html.erb : -------- <% if current_user %> NOT NIL <% else %> NIL <% end %> -------- home/_user_box.pl.html.erb : -------- <% if current_user %> NOT NIL <% else %> NIL <% end %> -------- layouts/layout.html.erb : -------- <%= render :partial => '/home/current_user' -%> <%= render :partial => '/home/user_box' %> ----- OUTPUT: ------- NIL NOT NIL ---- LOGS: ------- [INFO : 0925 13:43:58 #9238] Rendering template within layouts/layout [INFO : 0925 13:43:58 #9238] Rendering home/index [DEBUG: 0925 13:43:58 #9238] Rendered home/_current_user.pl (0.2ms) [DEBUG: 0925 13:43:58 #9238] User Columns (1.9ms) SHOW FIELDS FROM `users` [DEBUG: 0925 13:43:58 #9238] User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 [DEBUG: 0925 13:43:58 #9238] Rendered home/_user_box.pl (6.9ms) [INFO : 0925 13:43:58 #9238] Completed in 16ms (View: 8, DB: 2) | 200 OK [http://localhost/] Why is that so? Why one time it is nil and the other time it is not nil? Any help appreciated. Regards. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---