Can't put email address field on login form (Authlogic)

后端 未结 7 1419
北恋
北恋 2021-01-31 11:47

So I have Authlogic working fine with this user_sessions/new view:

<% form_for @user_session, :url => user_session_path do |f| %>

  <%          


        
相关标签:
7条回答
  • 2021-01-31 12:36

    Assuming you're using a User model, the easiest way to use email for authentication in Authlogic is:

    class User < ActiveRecord::Base
    
      acts_as_authentic do |c|
        c.login_field = 'email'
      end
    
    end
    
    0 讨论(0)
提交回复
热议问题