mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
renamed calls to timeliness_date_time_parse to parse_date_time which will correctly an overrided method
This commit is contained in:
parent
539f823b8b
commit
5e08a10fb0
@ -35,7 +35,7 @@ module ValidatesTimeliness
|
||||
|
||||
# Does strict time type cast checking for Rails 2.1 timezone handling
|
||||
def strict_time_type_cast(time)
|
||||
time = self.class.timeliness_date_time_parse(time, :datetime)
|
||||
time = self.class.parse_date_time(time, :datetime)
|
||||
time_in_time_zone(time)
|
||||
end
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ module ValidatesTimeliness
|
||||
when Proc
|
||||
restriction.call(record)
|
||||
else
|
||||
timeliness_date_time_parse(restriction, configuration[:type], false)
|
||||
parse_date_time(restriction, configuration[:type], false)
|
||||
end
|
||||
|
||||
next if compare.nil?
|
||||
|
||||
@ -21,7 +21,7 @@ describe ValidatesTimeliness::AttributeMethods do
|
||||
strict_time_type_cast("2000-02-01 25:13:14").should be_nil
|
||||
end
|
||||
|
||||
it "should return time object for time object" do
|
||||
it "should return Time object when passed a Time object" do
|
||||
strict_time_type_cast(Time.now).should be_kind_of(Time)
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user