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:
parent
f8a4341c76
commit
6486f56b0d
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ module DateTimeAttributeValidate
|
||||||
|
|
||||||
attributes.each do |attribute|
|
attributes.each do |attribute|
|
||||||
|
|
||||||
validate "#{attribute}_datetime_value_valid"
|
validate -> { self.send("#{attribute}_datetime_value_valid") }
|
||||||
|
|
||||||
# allow resetting the field to nil
|
# allow resetting the field to nil
|
||||||
before_validation do
|
before_validation do
|
||||||
|
|
Loading…
Reference in a new issue