Permalink
Browse files

Allow model configuration to be set to nil.

  • Loading branch information...
1 parent 5172d50 commit eb4437adaf2d23b965b9181076589a4b6c10e491 @josevalim josevalim committed Oct 29, 2009
Showing with 4 additions and 1 deletion.
  1. +1 −0 CHANGELOG.rdoc
  2. +3 −1 lib/devise.rb
View
@@ -5,6 +5,7 @@
* bug fix
* Do not redirect on invalid authenticate
+ * Allow model configuration to be set to nil
== 0.2.2
View
@@ -38,7 +38,9 @@ def #{accessor}
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}

0 comments on commit eb4437a

Please sign in to comment.