Open eng-Abdurhman opened 1 year ago
When the passed value is not a date. when it is a Numeric, then we get the following exception 👇 => NoMethodError: undefined method "to_date" for 444:Integer
NoMethodError: undefined method "to_date" for 444:Integer
Example: # app/models/item.rb
# app/models/item.rb
validates_date :expire_date
# console:
> item = Item.new(expire_date: 444) > item.valid? NoMethodError: undefined method `to_date' for 444:Integer
Can anyone help with this?
The suggested fix to handle Numeric values is: https://github.com/adzap/validates_timeliness/pull/229
When the passed value is not a date. when it is a Numeric, then we get the following exception 👇 =>
NoMethodError: undefined method "to_date" for 444:Integer
Example:
# app/models/item.rb
# console:
Can anyone help with this?
The suggested fix to handle Numeric values is: https://github.com/adzap/validates_timeliness/pull/229