Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix: ActiveRecord::RecordInvalid is not raised when an associated record ↵ | Vishal Telangre | 2019-05-10 | 1 | -0/+6 |
| | | | | | | | | fails to #save! due to uniqueness validation failure Add tests Fix tests failing due to introduction of uniquness rule added to Book model | ||||
* | Use frozen-string-literal in ActiveRecord | Kir Shatrov | 2017-07-19 | 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 |
| | |||||
* | Refactor enum to use `value` instead of `label` in the scope | Ryuta Kamizono | 2017-05-07 | 1 | -1/+1 |
| | |||||
* | Add type caster to `RuntimeReflection#alias_name` | Jon Moss | 2017-05-02 | 1 | -1/+1 |
| | | | | | Since we have been using this `Arel::Table` since 111ccc832bc977b15af12c14e7ca078dad2d4373, in order to properly handle queries, it's important that we properly type cast arguments. | ||||
* | Add tests for ActiveRecord::Enum#enum when suffix specified | Yosuke Kabuto | 2016-09-12 | 1 | -0/+1 |
| | | | | Make name of attribute medium instead of normal | ||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 1 | -1/+1 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | modernizes hash syntax in activerecord | Xavier Noria | 2016-08-06 | 1 | -1/+1 |
| | |||||
* | applies new string literal convention in activerecord/test | Xavier Noria | 2016-08-06 | 1 | -2/+2 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Use the database type to deserialize enum | Sean Griffin | 2016-01-23 | 1 | -0/+1 |
| | | | | | | | | | | | | This fixes incorrect assumptions made by e991c7b that we can assume the DB is already casting the value for us. The enum type needs additional information to perform casting, and needs a subtype. I've opted not to call `super` in `cast`, as we have a known set of types which we accept there, and the subtype likely doesn't accept them (symbol -> integer doesn't make sense) Close #23190 | ||||
* | Rename the enum_{prefix,suffix} options to _{prefix,suffix} | Robin Dupret | 2015-07-23 | 1 | -4/+4 |
| | | | | | | This makes it more clear that they are reserved keywords and also it seems less redundant as the line already starts with the call to the `enum` method. | ||||
* | Add enum prefix/suffix option to enum definition | Igor Kapkov | 2015-06-12 | 1 | -0/+4 |
| | | | | Fixes #17511 and #17415 | ||||
* | Add more tests for the dirty feature for enums | Rafael Mendonça França | 2014-01-21 | 1 | -0/+1 |
| | |||||
* | define enum methods inside a `Module` to make them overwritable. | Yves Senn | 2013-11-05 | 1 | -0/+5 |
| | |||||
* | Explicit mapping for enum | Yury Korolev | 2013-11-02 | 1 | -0/+1 |
| | |||||
* | Fix to work on Ruby 1.9.3, example and changelog improvements | Carlos Antonio da Silva | 2013-11-02 | 1 | -2/+2 |
| | |||||
* | Added ActiveRecord::Base#enum for declaring enum attributes where the values ↵ | David Heinemeier Hansson | 2013-11-02 | 1 | -2/+4 |
| | | | | map to integers in the database, but can be queried by name | ||||
* | rename `Relation#uniq` to `Relation#distinct`. `#uniq` still works. | Yves Senn | 2013-03-15 | 1 | -1/+1 |
| | | | | | | | | The similarity of `Relation#uniq` to `Array#uniq` is confusing. Since our Relation API is close to SQL terms I renamed `#uniq` to `#distinct`. There is no deprecation. `#uniq` and `#uniq!` are aliases and will continue to work. I also updated the documentation to promote the use of `#distinct`. | ||||
* | Convert association macros to the new syntax | Jon Leighton | 2012-07-20 | 1 | -1/+1 |
| | |||||
* | Initial nested_has_many_through support [#1152] | Bodaniel Jeanes | 2010-09-26 | 1 | -0/+2 |
| | |||||
* | test and fix collection_singular_ids= with string primary keys [#5125 ↵ | Robert Pankowecki | 2010-08-02 | 1 | -0/+3 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | move assets and models | Jeremy Kemper | 2008-01-18 | 1 | -0/+4 |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |