From ee490770724d5bb015dda92fb25f5e235967b6fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Thu, 26 Aug 2010 08:30:12 -0300 Subject: [PATCH] :default options is used, closes #452 --- lib/devise/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/devise/schema.rb b/lib/devise/schema.rb index f0ff2a14..d392434e 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.key?(:default) ? options[:default] : ("" if null == false) apply_devise_schema :email, String, :null => null, :default => default apply_devise_schema :encrypted_password, String, :null => null, :default => default, :limit => 128