Skip to content

Rails 4.2 : ActionView::Template::Error (undefined method `model_name' for #<UserSession: no credentials provided>) #432

Closed
@aurels

Description

@aurels

Hello,

I'm migrating my app from Rails 4.1 to 4.2, with AuthLogic version 3.4.2.

When visiting the login page, I get this error in the view :

undefined method `model_name' for #<UserSession: no credentials provided>

Here is the associated controller :

class UserSessionsController < ApplicationController

  layout 'login'

  before_action :login_required,    :only => [:destroy]
  before_action :no_login_required, :only => [:new, :create]

  def new
    @user_session = UserSession.new
  end

  ...
end

And the session model is empty :

# coding: UTF-8

class UserSession < Authlogic::Session::Base
end

And the user model :

acts_as_authentic do |config|
    config.maintain_sessions = true
    config.merge_validates_length_of_password_field_options({ :minimum => 8 })
end

Any idea ? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions