mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-22 22:06:45 +00:00
made parameters explicit for validates_timeliness since its private and should not be used directly for validation
This commit is contained in:
parent
4cb51ae602
commit
75f3ef34e8
@ -48,8 +48,7 @@ module ValidatesTimeliness
|
||||
|
||||
private
|
||||
|
||||
def validates_timeliness_of(*attr_names)
|
||||
configuration = attr_names.extract_options!
|
||||
def validates_timeliness_of(attr_names, configuration)
|
||||
validator = ValidatesTimeliness::Validator.new(configuration)
|
||||
|
||||
# bypass handling of allow_nil and allow_blank to validate raw value
|
||||
|
||||
@ -45,12 +45,4 @@ describe ValidatesTimeliness::ValidationMethods do
|
||||
ActiveRecord::Base.parse_date_time(*args)
|
||||
end
|
||||
end
|
||||
|
||||
# it "should have same value for before_type_cast after failed validation" do
|
||||
# person.birth_date_and_time = "2000-01-01 25:02:03"
|
||||
# person.should_not be_valid
|
||||
# person.birth_date_and_time_before_type_cast.should == "2000-01-01 25:02:03"
|
||||
# end
|
||||
#
|
||||
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user