if default_value.is_a?(Hash)
variables.push("count")
- default_value.each do |_subkey, subvalue|
+ default_value.each_value do |subvalue|
subvalue.scan(/%\{(\w+)\}/) do
variables.push(Regexp.last_match(1))
end
end
end
- if key =~ /^(active(model|record)\.)?errors\./
- variables.push("attribute")
- end
+ variables.push("attribute") if key =~ /^(active(model|record)\.)?errors\./
value = I18n.t(key, :locale => locale, :fallback => true)
end
end
- assert %w(ltr rtl).include?(I18n.t("html.dir", :locale => locale)), "html.dir must be ltr or rtl"
+ assert %w[ltr rtl].include?(I18n.t("html.dir", :locale => locale)), "html.dir must be ltr or rtl"
end
end