views:

2090

answers:

1

We am using authlogic for my user authentication.It works on other machines but i am getting the error

Extracted source (around line #20):

7:         <%= link_to "Home", "/", :title => 'Home', :class => 'header-logo' %>
18: 
19: 
20:        <span style="padding-left:850px;"> <% if current_user %>
21:             <%= link_to "My Account", account_path %>
22:             <%= link_to 'logout', logout_path, :method => :delete, :confirm => "Are you sure you want to logout?" %>
23:           <%elsif !current_user%>



app/models/user.rb:2:in `acts_as_authentic'
app/models/user.rb:2
app/controllers/application.rb:17:in `current_user_session'
app/controllers/application.rb:22:in `current_user'
(eval):2:in `send'
(eval):2:in `current_user'
app/views/layouts/application.html.erb:20

Suggest me what to do??

+1  A: 

Authlogic doesn't provide a current_user function. You have to make sure you provide it - in your ApplicationController, say.

Following the example is pretty easy (http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup). Authlogic is one of the better documented gems out there.

Also, the Google Group (http://groups.google.com/group/authlogic) is very active and quite responsive. You might have better luck there.

dbrown0708