mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-24 23:06:42 +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
|
private
|
||||||
|
|
||||||
def validates_timeliness_of(*attr_names)
|
def validates_timeliness_of(attr_names, configuration)
|
||||||
configuration = attr_names.extract_options!
|
|
||||||
validator = ValidatesTimeliness::Validator.new(configuration)
|
validator = ValidatesTimeliness::Validator.new(configuration)
|
||||||
|
|
||||||
# bypass handling of allow_nil and allow_blank to validate raw value
|
# 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)
|
ActiveRecord::Base.parse_date_time(*args)
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user