aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorArthur Zapparoli <arthurzap@gmail.com>2009-08-09 14:42:38 -0300
committerPratik Naik <pratiknaik@gmail.com>2009-08-09 23:55:54 +0100
commitce2422ceaf8ee128e6ea9d8582611ba2ac1e0406 (patch)
tree9a769e328a7d02bc96415893c4670b40476e0843 /activerecord/test
parent920ef4e6f3832ea1d3297e2e7e5f0f775dab69a8 (diff)
downloadrails-ce2422ceaf8ee128e6ea9d8582611ba2ac1e0406.tar.gz
rails-ce2422ceaf8ee128e6ea9d8582611ba2ac1e0406.tar.bz2
rails-ce2422ceaf8ee128e6ea9d8582611ba2ac1e0406.zip
Model#human_attribute_name now accept symbols [#3025 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/i18n_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/i18n_test.rb b/activerecord/test/cases/i18n_test.rb
index b1db662eca..d59c53cec8 100644
--- a/activerecord/test/cases/i18n_test.rb
+++ b/activerecord/test/cases/i18n_test.rb
@@ -12,6 +12,11 @@ class ActiveRecordI18nTests < Test::Unit::TestCase
I18n.backend.store_translations 'en', :activerecord => {:attributes => {:topic => {:title => 'topic title attribute'} } }
assert_equal 'topic title attribute', Topic.human_attribute_name('title')
end
+
+ def test_translated_model_attributes_with_symbols
+ I18n.backend.store_translations 'en', :activerecord => {:attributes => {:topic => {:title => 'topic title attribute'} } }
+ assert_equal 'topic title attribute', Topic.human_attribute_name(:title)
+ end
def test_translated_model_attributes_with_sti
I18n.backend.store_translations 'en', :activerecord => {:attributes => {:reply => {:title => 'reply title attribute'} } }