From 6486f56b0de691907ae1bf2c505fc5dbc99dc0c7 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Mon, 23 Mar 2020 14:16:32 +0100 Subject: [PATCH] Use function as argument for validate in date_time_attribute Passing the name of the function as string is deprecated. --- lib/date_time_attribute_validate.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/date_time_attribute_validate.rb b/lib/date_time_attribute_validate.rb index 0e697ce7..4a486195 100644 --- a/lib/date_time_attribute_validate.rb +++ b/lib/date_time_attribute_validate.rb @@ -12,7 +12,7 @@ module DateTimeAttributeValidate attributes.each do |attribute| - validate "#{attribute}_datetime_value_valid" + validate -> { self.send("#{attribute}_datetime_value_valid") } # allow resetting the field to nil before_validation do