lists-eJ8lBn5LdNBhbmWW9KSYcQ@public.gmane.org
2007-Jun-03 19:40 UTC
odd behavior with acts_as_authenticated
following the instructions on http://wiki.rubyonrails.com/rails/pages/Acts_as_authenticated I got it all working, except I can''t see how to make my currently logged in user''s info appear on the /account/index page. I replaced the poem that comes default from the generator in /account/ index.rhtml with: <h1>User home page.</h1> <% if logged_in? %> you are logged in <br> your email: <% current_user.email %> <br> your login: <% current_user.login %> <% else %> you are not logged in <% end %> This WORKS to show me if the user is logged in or now (so I guess the logged_in? is ok), but for some reason <% current_user.email %> and <% current_user.login %> both come out blank even though I can see data in the database for the currently logged in user. Maybe I got the syntax wrong or something? Wondering how to make this work. thanks. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> This WORKS to show me if the user is logged in or now (so I guess the > logged_in? is ok), but for some reason <% current_user.email %> and <% > current_user.login %> both come out blank even though I can see data > in the database for the currently logged in user. > > Maybe I got the syntax wrong or something? Wondering how to make this > work. thanks.Use <%= if you want to actually output the data. This has nothing to do with acts_as_authenticated. -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---