Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use frozen string literal in activemodel/ | Kir Shatrov | 2017-07-16 | 1 | -0/+2 |
| | |||||
* | Revert "Merge pull request #29540 from kirs/rubocop-frozen-string" | Matthew Draper | 2017-07-02 | 1 | -1/+0 |
| | | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa. | ||||
* | Enforce frozen string in Rubocop | Kir Shatrov | 2017-07-01 | 1 | -0/+1 |
| | |||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 1 | -4/+4 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | applies remaining conventions across the project | Xavier Noria | 2016-08-06 | 1 | -1/+0 |
| | |||||
* | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 1 | -1/+0 |
| | |||||
* | modernizes hash syntax in activemodel | Xavier Noria | 2016-08-06 | 1 | -3/+3 |
| | |||||
* | applies new string literal convention in activemodel/test | Xavier Noria | 2016-08-06 | 1 | -41/+41 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | add test for nested model translation | keepcosmos | 2015-12-03 | 1 | -0/+5 |
| | |||||
* | Run ActiveModel test suites in random order. | Zuhao Wan | 2014-03-10 | 1 | -0/+4 |
| | | | | | | | | | | This gets the whole ActiveModel test suites working even if `self.i_suck_and_my_tests_are_order_dependent!` is disabled in `ActiveSupport::TestCase`. Two places are found that potentially leak global state. This patch makes sure states are restored so that none of the changes happen in a single test will be carried over to subsequence tests. | ||||
* | Convert ActiveModel to 1.9 hash syntax. | Patrick Robertson | 2013-05-01 | 1 | -20/+23 |
| | | | | | I also attempted to fix other styleguide violations such as { a: :b } over {a: :b} and foo(b: 'bar') over foo( b: 'bar' ). | ||||
* | Fix human attribute_name to handle deeply nested attributes | Tsutomu Kuroda | 2012-05-16 | 1 | -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_merge | Carlos Antonio da Silva | 2012-04-28 | 1 | -2/+8 |
| | |||||
* | Namespaced attribute lookup now works as 'model/association.attribute'. | José Valim | 2011-12-05 | 1 | -5/+5 |
| | |||||
* | Fix human_attribute_name to handle names with dots | Tsutomu Kuroda | 2011-12-05 | 1 | -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é Valim | 2011-06-11 | 1 | -10/+0 |
| | |||||
* | Brought back alternative convention for namespaced models in i18n. | thoefer | 2011-06-08 | 1 | -0/+10 |
| | |||||
* | failing test for i18n key collision with namespaced models | Santiago Pastorino | 2011-02-27 | 1 | -0/+7 |
| | |||||
* | Test using default option as symbol added for human_attribute_name | Santiago Pastorino | 2010-12-05 | 1 | -0/+5 |
| | |||||
* | default could be a symbol here so attribute.to_s.humanize should be the ↵ | Santiago Pastorino | 2010-12-05 | 1 | -0/+4 |
| | | | | final option | ||||
* | Test falling back to default added for human_attribute_name | Santiago Pastorino | 2010-12-05 | 1 | -0/+4 |
| | |||||
* | Test using default option added for human_attribute_name | Santiago Pastorino | 2010-12-05 | 1 | -0/+4 |
| | |||||
* | Don't act destructively on ActiveModel::Name#human options hash. [#5366 ↵ | John Firebaugh | 2010-09-25 | 1 | -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 Pastorino | 2010-08-14 | 1 | -2/+2 |
| | | | | 's/[ \t]*$//' -i {} \;) | ||||
* | Allow to specify default attributes names translation in I18n yml files. | José Valim | 2010-01-07 | 1 | -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é Valim | 2009-12-23 | 1 | -21/+15 |
| | |||||
* | Move validator, human_name and human_attribute_name to ActiveModel, remove ↵ | José Valim | 2009-10-20 | 1 | -0/+51 |
deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: Carl Lerche <carllerche@mac.com> |