Always allow %{attribute} in model validation error messages
This commit is contained in:
parent
b7e795e1e1
commit
90875bb08a
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue