From 9cfbb2a4581d7bb7ec48284e606433d9a73fd11a Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Fri, 11 Dec 2009 15:12:49 +1100 Subject: [PATCH] fix for I18n formats lookup in Rails <= 2.3.3 vendored I18n --- lib/validates_timeliness/validator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/validates_timeliness/validator.rb b/lib/validates_timeliness/validator.rb index 956d669..b4de3ee 100644 --- a/lib/validates_timeliness/validator.rb +++ b/lib/validates_timeliness/validator.rb @@ -164,7 +164,8 @@ module ValidatesTimeliness def error_value_format_for(type) if defined?(I18n) - I18n.t(type, :default => error_value_formats[type], :scope => 'validates_timeliness.error_value_formats') + # work around for syntax check in vendored I18n for Rails <= 2.3.3 + I18n.t('validates_timeliness.error_value_formats')[type] || error_value_formats[type] else error_value_formats[type] end