lib/simple_auth/session.rb in simple_auth-1.5.0 vs lib/simple_auth/session.rb in simple_auth-2.0.0
- old
+ new
@@ -121,10 +121,10 @@
def persisted?
!new_record?
end
def valid?
- if record && record.authorized?
+ if record && controller.send(:authorized?)
true
else
errors.add_to_base I18n.translate("simple_auth.sessions.invalid_credentials")
self.class.destroy!
false