aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/cases/translation_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix human attribute_name to handle deeply nested attributesTsutomu Kuroda2012-05-161-0/+5
| | | | | | | | | | | | When a model nests another model that also nests yet another model using accepts_nested_attributes_for method, its Errors object can have an attribute name with "contacts.addresses.street" style. In this case, the dots within the namespace should be substituted with slashes so that we can provide the translation under the "activemodel.attributes.person/contacts/addresses.street" key. This commit is related to #3859.
* Do not modify options hash in human_attribute_name, remove reverse_mergeCarlos Antonio da Silva2012-04-281-2/+8
|
* Namespaced attribute lookup now works as 'model/association.attribute'.José Valim2011-12-051-5/+5
|
* Fix human_attribute_name to handle names with dotsTsutomu Kuroda2011-12-051-0/+10
| | | | | | | | Nested I18n namespace lookup under activerecord.models is deprecated now (c19bd4f). But when a model uses accepts_nested_attributes_for, its Errors object can have an attribute name with "addresses.street" style. In this case, the dots should be substituted with slashes so that we can provide the translation under the "activemodel.attributes.person.addresses/street" key.
* Get rid of the alternate namespace lookup.José Valim2011-06-111-10/+0
|
* Brought back alternative convention for namespaced models in i18n.thoefer2011-06-081-0/+10
|
* failing test for i18n key collision with namespaced modelsSantiago Pastorino2011-02-271-0/+7
|
* Test using default option as symbol added for human_attribute_nameSantiago Pastorino2010-12-051-0/+5
|
* default could be a symbol here so attribute.to_s.humanize should be the ↵Santiago Pastorino2010-12-051-0/+4
| | | | final option
* Test falling back to default added for human_attribute_nameSantiago Pastorino2010-12-051-0/+4
|
* Test using default option added for human_attribute_nameSantiago Pastorino2010-12-051-0/+4
|
* Don't act destructively on ActiveModel::Name#human options hash. [#5366 ↵John Firebaugh2010-09-251-0/+6
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-2/+2
| | | | 's/[ \t]*$//' -i {} \;)
* Allow to specify default attributes names translation in I18n yml files.José Valim2010-01-071-0/+5
| | | | | | | | | | | | For example, you could easily specify :created_at and :updated_at translations as: en: attributes: created_at: "Created at" updated_at: "Updated at" This configuration is built on ActiveModel, so it means those translations are shared between different ORMs as well (but always as a fallback).
* Small clean up in Naming and TTranslation tests.José Valim2009-12-231-21/+15
|
* Move validator, human_name and human_attribute_name to ActiveModel, remove ↵José Valim2009-10-201-0/+51
deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: Carl Lerche <carllerche@mac.com>