Allow model configuration to be set to nil.
This commit is contained in:
parent
5172d50b95
commit
eb4437adaf
|
@ -5,6 +5,7 @@
|
|||
|
||||
* bug fix
|
||||
* Do not redirect on invalid authenticate
|
||||
* Allow model configuration to be set to nil
|
||||
|
||||
== 0.2.2
|
||||
|
||||
|
|
|
@ -38,7 +38,9 @@ module Devise
|
|||
|
||||
mod.const_get(:ClassMethods).class_eval <<-METHOD, __FILE__, __LINE__
|
||||
def #{accessor}
|
||||
@#{accessor} || if superclass.respond_to?(:#{accessor})
|
||||
if defined?(@#{accessor})
|
||||
@#{accessor}
|
||||
elsif superclass.respond_to?(:#{accessor})
|
||||
superclass.#{accessor}
|
||||
else
|
||||
Devise.#{accessor}
|
||||
|
|
Loading…
Reference in New Issue