aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/book.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Refactor enum to use `value` instead of `label` in the scopeRyuta Kamizono2017-05-071-1/+1
|
* Add type caster to `RuntimeReflection#alias_name`Jon Moss2017-05-021-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 specifiedYosuke Kabuto2016-09-121-0/+1
| | | | Make name of attribute medium instead of normal
* Add three new rubocop rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* modernizes hash syntax in activerecordXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-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 enumSean Griffin2016-01-231-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 Dupret2015-07-231-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 definitionIgor Kapkov2015-06-121-0/+4
| | | | Fixes #17511 and #17415
* Add more tests for the dirty feature for enumsRafael Mendonça França2014-01-211-0/+1
|
* define enum methods inside a `Module` to make them overwritable.Yves Senn2013-11-051-0/+5
|
* Explicit mapping for enumYury Korolev2013-11-021-0/+1
|
* Fix to work on Ruby 1.9.3, example and changelog improvementsCarlos Antonio da Silva2013-11-021-2/+2
|
* Added ActiveRecord::Base#enum for declaring enum attributes where the values ↵David Heinemeier Hansson2013-11-021-2/+4
| | | | map to integers in the database, but can be queried by name
* rename `Relation#uniq` to `Relation#distinct`. `#uniq` still works.Yves Senn2013-03-151-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 syntaxJon Leighton2012-07-201-1/+1
|
* Initial nested_has_many_through support [#1152]Bodaniel Jeanes2010-09-261-0/+2
|
* test and fix collection_singular_ids= with string primary keys [#5125 ↵Robert Pankowecki2010-08-021-0/+3
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* move assets and modelsJeremy Kemper2008-01-181-0/+4
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de