mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-22 22:06:45 +00:00
fix for I18n formats lookup in Rails <= 2.3.3 vendored I18n
This commit is contained in:
parent
78baa7a3cc
commit
9cfbb2a458
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user