Always allow %{attribute} in model validation error messages

This commit is contained in:
Tom Hughes 2013-08-06 21:36:54 +01:00
parent b7e795e1e1
commit 90875bb08a

View file

@ -24,6 +24,10 @@ class I18nTest < ActiveSupport::TestCase
end
end
if key =~ /^(active(model|record)\.)?errors\./
variables.push("attribute")
end
value = I18n.t(key, :locale => locale, :fallback => true)
if value.is_a?(Hash)