mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 07:16:41 +00:00
Stricter method signature for _timeliness_raw_value_for to take string
Add basic validation specs to each ORM shim
This commit is contained in:
@@ -82,7 +82,7 @@ module ValidatesTimeliness
|
||||
end
|
||||
|
||||
def _timeliness_raw_value_for(attr_name)
|
||||
@timeliness_cache && @timeliness_cache[attr_name.to_s]
|
||||
@timeliness_cache && @timeliness_cache[attr_name]
|
||||
end
|
||||
|
||||
def _clear_timeliness_cache
|
||||
|
||||
@@ -77,7 +77,7 @@ module ValidatesTimeliness
|
||||
|
||||
def attribute_raw_value(record, attr_name)
|
||||
record.respond_to?(:_timeliness_raw_value_for) &&
|
||||
record._timeliness_raw_value_for(attr_name)
|
||||
record._timeliness_raw_value_for(attr_name.to_s)
|
||||
end
|
||||
|
||||
def timezone_aware?(record, attr_name)
|
||||
|
||||
Reference in New Issue
Block a user