From 90875bb08a63061f926228e14327286297c51ed2 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 6 Aug 2013 21:36:54 +0100 Subject: [PATCH] Always allow %{attribute} in model validation error messages --- test/unit/i18n_test.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/unit/i18n_test.rb b/test/unit/i18n_test.rb index c1dacbff2..2fb13824c 100644 --- a/test/unit/i18n_test.rb +++ b/test/unit/i18n_test.rb @@ -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) -- 2.43.2