Use function as argument for validate in date_time_attribute

Passing the name of the function as string is deprecated.
This commit is contained in:
Patrick Gansterer 2020-03-23 14:16:32 +01:00
parent f8a4341c76
commit 6486f56b0d

View file

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