mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-24 23:06:42 +00:00
updated extract method name to parse
This commit is contained in:
parent
89f12b3a25
commit
4d23756b47
@ -29,7 +29,7 @@ module ValidatesTimeliness
|
|||||||
def timeliness_date_time_parse(raw_value, type, strict=true)
|
def timeliness_date_time_parse(raw_value, type, strict=true)
|
||||||
return raw_value.to_time if raw_value.acts_like?(:time) || raw_value.is_a?(Date)
|
return raw_value.to_time if raw_value.acts_like?(:time) || raw_value.is_a?(Date)
|
||||||
|
|
||||||
time_array = ValidatesTimeliness::Formats.extract_date_time_values(raw_value, type, strict)
|
time_array = ValidatesTimeliness::Formats.parse(raw_value, type, strict)
|
||||||
raise if time_array.nil?
|
raise if time_array.nil?
|
||||||
|
|
||||||
if type == :time
|
if type == :time
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user