Revert "Translate the attributes prefixed with _html to keep the html markup."

This reverts commit 337fce04f3.
This commit is contained in:
José Valim 2015-09-07 10:01:19 +02:00
parent 451e25de1b
commit 63fbc2d5a8
2 changed files with 0 additions and 13 deletions

View File

@ -178,14 +178,10 @@ module SimpleForm
model_names.shift
lookups << :"#{joined_model_names}.#{lookup_action}.#{reflection_or_attribute_name}"
lookups << :"#{joined_model_names}.#{lookup_action}.#{reflection_or_attribute_name}_html"
lookups << :"#{joined_model_names}.#{reflection_or_attribute_name}"
lookups << :"#{joined_model_names}.#{reflection_or_attribute_name}_html"
end
lookups << :"defaults.#{lookup_action}.#{reflection_or_attribute_name}"
lookups << :"defaults.#{lookup_action}.#{reflection_or_attribute_name}_html"
lookups << :"defaults.#{reflection_or_attribute_name}"
lookups << :"defaults.#{reflection_or_attribute_name}_html"
lookups << default
t(lookups.shift, scope: :"#{i18n_scope}.#{namespace}", default: lookups).presence

View File

@ -115,15 +115,6 @@ class StringInputTest < ActionView::TestCase
end
end
test 'input translates a key prefixed with _html and return the html markup' do
store_translations(:en, simple_form: { labels: { user: {
name_html: '<b>Name</b>'
} } }) do
with_input_for @user, :name, :string
assert_select 'label b', 'Name'
end
end
[:email, :url, :search, :tel].each do |type|
test "input allows type #{type}" do
with_input_for @user, :name, type