mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +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)
|
def error_value_format_for(type)
|
||||||
if defined?(I18n)
|
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
|
else
|
||||||
error_value_formats[type]
|
error_value_formats[type]
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user