aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/admin
Commit message (Collapse)AuthorAgeFilesLines
* Update prefix and allow suffix options for store accessorsYukio Mizuta2018-06-121-0/+3
|
* Add custom prefix to ActiveRecord::Store accessorsTan Huynh2018-03-231-0/+3
| | | | | | Add a prefix option to ActiveRecord::Store.store_accessor and ActiveRecord::Store.store. This option allows stores to have identical keys with different accessors.
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-193-7/+13
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-023-10/+7
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-013-7/+10
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-2/+2
|
* modernizes hash syntax in activerecordXavier Noria2016-08-061-4/+4
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add line endings to files which are missing themSean Griffin2015-02-171-1/+1
| | | | | | These files get modified whenever someone uses a tool like `sed`. Let's just get this over with in one commit so it'd not adding diff noise to something else.
* Fixes #18492Vipul A M2015-01-141-2/+6
| | | | | | | - Add check for not deleting previously created fixtures, to overcome sti fixtures from multiple files - Added fixtures and fixtures test to verify the same - Fixed wrong fixtures duplicating data insertion in same table
* Remove warnings in test suiteMatthias Zirnstein2014-01-061-1/+1
| | | | | | | lib/active_record/store.rb:79: warning: method redefined; discarding old color= lib/active_record/store.rb:79: warning: previous definition of color= was here lib/active_record/store.rb:83: warning: method redefined; discarding old color lib/active_record/store.rb:83: warning: previous definition of color was here
* Fix: ActiveRecord::Store TypeError conversion when using YAML coderThales Oliveira2014-01-061-0/+1
| | | | | | | | | | Renaming the test accordingly to its behaviour Adding 'Fixes' statement to changelog Improving tests legibility & changelog Undoing mistakenly removed empty line & further improving changelog
* define Active Record Store accessors in a moduleSergey Nartimov2013-02-111-0/+9
| | | | | | | | | | | | | 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
* Remove warning by using a custom coderAndrew White2013-01-231-2/+16
| | | | | | | | | | | | | | The native JSON library bypasses the `to_json` overrides in active_support/core_ext/object/to_json.rb by calling its native implementation directly. However `ActiveRecord::Store` uses a HWIA so `JSON.dump` will call our `to_json` instead with a `State` object for options rather than a `Hash`. This generates a warning when the `:encoding`, `:only` & `:except` keys are accessed in `Hash#as_json` because the `State` object delegates unknown keys to `instance_variable_get` in its `:[]` method. Workaround this warning in the test by using a custom coder that calls `ActiveSupport::JSON.encode` directly.
* fix warning: method redefinedkennyj2012-10-021-1/+1
|
* refactor store_accessorMatt Jones2012-09-131-1/+9
|
* correctly flag changed attributes in AR::Store, combine multiple calls to ↵Matt Jones2012-09-051-0/+1
| | | | store_accessor
* Custom coders support for ActiveRecord::Store. JSON, YAML, Marshal can be ↵Andrey Voronkov2012-05-091-0/+2
| | | | used out of the box.
* Allow store to be a not null column.Jeremy Walker2012-02-021-0/+1
|
* Test fixtures with custom model and table namesAlexey Muranov2011-12-301-0/+3
| | | | | | Test using fixtures with random names and model names, that is not following naming conventions but using set_fixture_class instead. It is expected that the table name be defined in the model, but this is not explicitly tested here. This will need to be fixed.
* Tests gotta run in 1.8 tooJeremy Kemper2011-10-131-2/+2
|
* Added ActiveRecord::Base.store for declaring simple single-column key/value ↵David Heinemeier Hansson2011-10-131-0/+1
| | | | stores [DHH]
* Support fixtures for namespaced models [#2965 state:resolved]Andrew White2010-04-252-0/+6
Signed-off-by: José Valim <jose.valim@gmail.com>