Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Validation errors "no credentials provided" before .valid? or .save #53

shaicoleman opened this Issue Sep 29, 2009 · 1 comment


None yet
2 participants

AuthLogic doesn't behave like ActiveRecord.

With ActiveRecord, the @errors array is filled only after running .valid? or .save
With AuthLogic it is run automatically and there is no way to disable it.

AuthLogic will therefore mark the fields login and password as error. As these are added to the base errors, there's no way to clear those errors. This is especially an issue if AuthLogic is used in conjunction with Formtastic. In that case those fields will always be highlighted as errors.

AuthLogic shouldn't check for errors until the .valid? or .save methods are called.

To reproduce, modify the authlogic example as follows,
class UserSessionsController < ApplicationController
def new
@user_session = UserSession.new
raise @user_session.inspect # will always show an error


jaredbeck commented Dec 25, 2016

Closing due to inactivity. If this is still an issue, please let us know and we'll be happy to reopen it.

@jaredbeck jaredbeck closed this Dec 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment