mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 07:16:41 +00:00
fixed instance_tag value method when attribute value is nil and improved specs
This commit is contained in:
@@ -23,7 +23,7 @@ module ValidatesTimeliness
|
||||
|
||||
raw_value = value_before_type_cast(object)
|
||||
|
||||
if raw_value.acts_like?(:time) || raw_value.is_a?(Date)
|
||||
if raw_value.nil? || raw_value.acts_like?(:time) || raw_value.is_a?(Date)
|
||||
return value_without_timeliness(object)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user