Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Use assert_predicate and assert_not_predicate | Daniel Colson | 2018-01-25 | 1 | -3/+3 |
| | |||||
* | 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 |
| | |||||
* | 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 | -50/+50 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Test parent local_stored_attributes isn't modified | David Genord II | 2016-02-16 | 1 | -0/+1 |
| | | | | Saw the `merge!` and had to prove to myself that the parent model's local_stored_attributes was not being changed when stored_attributes is called on a child model. Proved to be working as expected but this test is probably still useful to keep around. | ||||
* | Typos in AR tests | Akira Matsuda | 2016-02-04 | 1 | -1/+1 |
| | |||||
* | Introduce an Attribute object to handle the type casting dance | Sean Griffin | 2014-06-13 | 1 | -1/+0 |
| | | | | | | | | | | | | | | | There's a lot more that can be moved to these, but this felt like a good place to introduce the object. Plans are: - Remove all knowledge of type casting from the columns, beyond a reference to the cast_type - Move type_cast_for_database to these objects - Potentially make them mutable, introduce a state machine, and have dirty checking handled here as well - Move `attribute`, `decorate_attribute`, and anything else that modifies types to mess with this object, not the columns hash - Introduce a collection object to manage these, reduce allocations, and not require serializing the types | ||||
* | Don't change values in `@raw_attributes` during serialization | Sean Griffin | 2014-06-01 | 1 | -14/+0 |
| | | | | | | During `init_with`, the attributes given to the coder will be placed into `@raw_attributes`. As such, we should read from `@raw_attributes` when encoding, rather than `@attributes`, which has been type cast. | ||||
* | Fix inheritance of stored_attributes (fixes #14672) | Jessica Yao | 2014-05-14 | 1 | -0/+16 |
| | | | | [Brad Bennett, Jessica Yao, & Lakshmi Parthasarathy] | ||||
* | Aesthetic | Rafael Mendonça França | 2014-01-29 | 1 | -6/+7 |
| | |||||
* | Fixing issue with activerecord serialization not being able to dump a record ↵ | Mauricio Linhares | 2014-01-29 | 1 | -0/+23 |
| | | | | after loading it from YAML - fixes #13861 | ||||
* | Fix: ActiveRecord::Store TypeError conversion when using YAML coder | Thales Oliveira | 2014-01-06 | 1 | -0/+4 |
| | | | | | | | | | | Renaming the test accordingly to its behaviour Adding 'Fixes' statement to changelog Improving tests legibility & changelog Undoing mistakenly removed empty line & further improving changelog | ||||
* | `stored_attributes` need to be specific to a subclass. | Yves Senn | 2013-10-25 | 1 | -0/+12 |
| | | | | | | | | | | | | | | | | | Currently they are all stored globally in the same `Hash`. This commit forces the creation of a per-class variable if necessary. The behavior was exposed through the following test-case: ``` 1) Failure: StoreTest#test_all_stored_attributes_are_returned [/Users/senny/Projects/rails/activerecord/test/cases/store_test.rb:151]: --- expected +++ actual @@ -1 +1 @@ -[:color, :homepage, :favorite_food] +[:resolution, :color, :homepage, :favorite_food] ``` | ||||
* | Remove unnecessary testcase for instance level stored_attributes. | kennyj | 2013-06-02 | 1 | -5/+0 |
| | |||||
* | define Active Record Store accessors in a module | Sergey Nartimov | 2013-02-11 | 1 | -0/+12 |
| | | | | | | | | | | | | | Allow store accessors to be overrided like other attribute methods, e.g.: class User < ActiveRecord::Base store :settings, accessors: [ :color, :homepage ], coder: JSON def color super || 'red' end end | ||||
* | Revert "Merge pull request #8989 from robertomiranda/use-rails-4-find-by" | Guillermo Iguaran | 2013-01-18 | 1 | -1/+1 |
| | | | | | This reverts commit 637a7d9d357a0f3f725b0548282ca8c5e7d4af4a, reversing changes made to 5937bd02dee112646469848d7fe8a8bfcef5b4c1. | ||||
* | User Rails 4 find_by | robertomiranda | 2013-01-18 | 1 | -1/+1 |
| | |||||
* | Namespace HashWithIndifferentAccess | Akira Matsuda | 2013-01-07 | 1 | -4/+3 |
| | |||||
* | fix warning: method redefined | kennyj | 2012-10-02 | 1 | -1/+1 |
| | |||||
* | refactor store_accessor | Matt Jones | 2012-09-13 | 1 | -1/+13 |
| | |||||
* | correctly flag changed attributes in AR::Store, combine multiple calls to ↵ | Matt Jones | 2012-09-05 | 1 | -2/+8 |
| | | | | store_accessor | ||||
* | Use instance_accessor: false instead of instance_writer. | kennyj | 2012-08-21 | 1 | -3/+2 |
| | |||||
* | Added *instance_writer: false* for stored/serialized attributes. | kennyj | 2012-07-07 | 1 | -0/+7 |
| | |||||
* | Don't mark the store as changed if an attribute isn't changed. | kennyj | 2012-07-03 | 1 | -0/+5 |
| | |||||
* | Remember the stored attributes in a config attribute. | Joost Baaij | 2012-06-18 | 1 | -1/+5 |
| | | | | | | This allows you to retrieve the list of attributes you've defined. Usable for e.g. selects in the view, or interators based on the attributes you wish to store in the serialized column. | ||||
* | Fix backward compatibility with stored Hash values. Wrap coders to convert ↵ | Jeremy Kemper | 2012-05-30 | 1 | -13/+16 |
| | | | | serialized values to indifferent access. | ||||
* | Convert Hash to HashWithIndifferentAccess in ActiveRecord::Store. | Andrey Voronkov | 2012-05-22 | 1 | -0/+34 |
| | | | | | | | In order to make migration from 3.x apps easier, we should try to convert Hash instances to HashWithIndifferentAccess, to allow accessing values with both symbol and a string. This is follow up to changes in 3c0bf043. | ||||
* | Custom coders support for ActiveRecord::Store. JSON, YAML, Marshal can be ↵ | Andrey Voronkov | 2012-05-09 | 1 | -1/+35 |
| | | | | used out of the box. | ||||
* | Allow store to be a not null column. | Jeremy Walker | 2012-02-02 | 1 | -2/+11 |
| | |||||
* | Fix typo | Jon Leighton | 2011-11-30 | 1 | -2/+2 |
| | |||||
* | Merge branch 'master' of github.com:rails/rails | David Heinemeier Hansson | 2011-10-25 | 1 | -3/+3 |
|\ | |||||
| * | Rails 4 is just around the corner. Stuck with 1.8 until then. | Jeremy Kemper | 2011-10-13 | 1 | -3/+3 |
| | | |||||
* | | Fix that changing a store should mark the store attribute as changed | David Heinemeier Hansson | 2011-10-25 | 1 | -0/+5 |
|/ | |||||
* | Added ActiveRecord::Base.store for declaring simple single-column key/value ↵ | David Heinemeier Hansson | 2011-10-13 | 1 | -0/+29 |
stores [DHH] |