Authlogic Rails 3

I am having a weird issue with Authlogic in Rails 3. I followed this practical here , but I get:

NoMethodError in PeopleController#my

undefined method `login_field' for Object:Class

app/controllers/application_controller.rb:33:in `current_session'
app/controllers/application_controller.rb:39:in `current_user'
app/controllers/application_controller.rb:44:in `require_user'

Any ideas on how to get this fix?

0
source share
2 answers

Can you post the appropriate source? I think you made 2 mistakes

  • You tried to configure actions_as_authentic parameters in people_controller.rb instead of a model (supposedly called app / models / people.rb in code)
  • You did not transfer this code to the "act_as_authentic" method block

Try this in the app /models/people.rb

acts_as_authentic do |config|
    config.login_field = :email
end
0
source

Have you added an input field to the input field? You can delete it.

0
source

All Articles