Created
August 26, 2010 03:08
-
-
Save aptinio/550713 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/devise/schema.rb b/lib/devise/schema.rb | |
index f0ff2a1..94296e4 100644 | |
--- a/lib/devise/schema.rb | |
+++ b/lib/devise/schema.rb | |
@@ -14,7 +14,7 @@ module Devise | |
# encrypter password field in 128 characters. | |
def database_authenticatable(options={}) | |
null = options[:null] || false | |
- default = options[:default] || "" | |
+ default = options[:default] || null ? nil : "" | |
apply_devise_schema :email, String, :null => null, :default => default | |
apply_devise_schema :encrypted_password, String, :null => null, :default => default, :limit => 128 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment