made parameters explicit for validates_timeliness since its private and should not be used directly for validation

This commit is contained in:
Adam Meehan 2008-12-05 20:35:37 +11:00
parent 4cb51ae602
commit 75f3ef34e8
2 changed files with 1 additions and 10 deletions

View File

@ -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

View File

@ -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