aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/contact.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deduplicate various Active Record schema cache structuresJean Boussier2019-06-031-9/+9
| | | | | | | | | | | | Real world database schemas contain a lot of duplicated data. Some column names like `id`, `created_at` etc can easily be repeated hundreds of times. Same for SqlTypeMetada, most database will contain only a limited number of possible combinations. This result in a lot of wasted memory. The idea here is to make these data sctructures immutable, use a registry to substitute similar instances with pre-existing ones.
* 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
|
* modernizes hash syntax in activerecordXavier Noria2016-08-061-2/+2
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* introduce `conn.data_source_exists?` and `conn.data_sources`.Yves Senn2015-09-221-1/+1
| | | | | | | | | | | | | | | | | These new methods are used from the Active Record model layer to determine which relations are viable to back a model. These new methods allow us to change `conn.tables` in the future to only return tables and no views. Same for `conn.table_exists?`. The goal is to provide the following introspection methods on the connection: * `tables` * `table_exists?` * `views` * `view_exists?` * `data_sources` (views + tables) * `data_source_exists?` (views + tables)
* Move writing unknown column exception to null attributeSean Griffin2014-06-261-0/+1
| | | | | | Making this change revealed several subtle bugs related to models with no primary key, and anonymous classes. These have been fixed as well, with regression tests added.
* Add some coverage for AR serialization with serializable_hashCarlos Antonio da Silva2012-06-221-17/+32
| | | | | | ActiveRecord json/xml serialization should use as base serializable_hash, provided by ActiveModel. Add some more coverage around options :only and :except for both json and xml serialization.
* Raise error when using write_attribute with a non-existent attribute.Jon Leighton2011-09-131-6/+7
| | | | | | | | | Previously we would just silently write the attribute. This can lead to subtle bugs (for example, see the change in AutosaveAssociation where a through association would wrongly gain an attribute. Also, ensuring that we never gain any new attributes after initialization will allow me to reduce our dependence on method_missing.
* introduce a fake AR adapter for mocking database return valuesAaron Patterson2011-02-041-5/+7
|
* share column cache among subclasses, only look up columns per AR::Base ↵Aaron Patterson2011-02-011-0/+4
| | | | subclass once
* to_xml with :include should skip_instruct on the included records [#4506 ↵Lawrence Pit2010-04-301-1/+3
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* move assets and modelsJeremy Kemper2008-01-181-0/+16
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de