Stricter method signature for _timeliness_raw_value_for to take string

Add basic validation specs to each ORM shim
This commit is contained in:
Adam Meehan
2012-03-29 13:00:28 +11:00
parent df12d6dad0
commit 4aa20bb002
4 changed files with 82 additions and 14 deletions

View File

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

View File

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