default to datetime type using validates method

This commit is contained in:
Adam Meehan
2010-08-02 18:13:04 +10:00
parent 896fd83be5
commit e91d5a3404
2 changed files with 6 additions and 1 deletions

View File

@@ -18,7 +18,7 @@ module ValidatesTimeliness
def initialize(options)
@allow_nil, @allow_blank = options.delete(:allow_nil), options.delete(:allow_blank)
@type = options.delete(:type)
@type = options.delete(:type) || :datetime
@check_restrictions = RESTRICTIONS.keys & options.keys
if range = options.delete(:between)