aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate passing a string as third argument of `add_index`Rafael Mendonça França2012-11-021-0/+7
| | | | | | | This was there due historical reasons since 7dc45818dc43c163700efc9896a0f3feafa31138 to give the user the possibility to create unique indexes passing "UNIQUE" as the third argument
* Raise an ArgumentError when passing an invalid option to add_indexRafael Mendonça França2012-11-021-0/+4
| | | | Closes #8104
* Fix find_in_batches against string IDs when start option is not specified.Alexis Bernard2012-10-311-0/+4
|
* Fix `attributes_before_type_cast` for serialised attributes.Nikita Afanasenko2012-10-311-0/+4
| | | | Public method `attributes_before_type_cast` used to return internal AR structure (ActiveRecord::AttributeMethods::Serialization::Attribute), patch fixes this. Now behaves like `read_attribute_before_type_cast` and returns unserialised values.
* Fix #6951. Use query cache/uncache, when using not only database.yml but ↵kennyj2012-10-311-0/+5
| | | | also DATABASE_URL.
* ActiveRecord::Relation#none! method.Juanjo Bazán2012-10-281-0/+5
|
* Enable update_column(s) for the primary key attribute.Henrik N2012-10-281-0/+4
| | | | Didn't work before because it updated the model-in-memory first, so the DB query couldn't find the record.
* raise `ArgumentError` when redefining the primary key column. Closes #6378Yves Senn2012-10-281-0/+5
|
* AR::AttributeMethods#[] raises AM::AttributeMissingError for missing attributes.Francesco Rodriguez2012-10-281-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the following behaviour: class Person < ActiveRecord::Base belongs_to :company end # Before: person = Person.select('id').first person[:name] # => nil person.name # => ActiveModel::MissingAttributeError: missing_attribute: name person[:company_id] # => nil person.company # => nil # After: person = Person.select('id').first person[:name] # => ActiveModel::MissingAttributeError: missing_attribute: name person.name # => ActiveModel::MissingAttributeError: missing_attribute: name person[:company_id] # => ActiveModel::MissingAttributeError: missing_attribute: company_id person.company # => ActiveModel::MissingAttributeError: missing_attribute: company_id Fixes #5433.
* Use the MySQL varbinary type when appropriate in migrations.Victor Costan2012-10-271-0/+4
|
* Decode attributes pulled from URI.parseShawn Veader2012-10-261-1/+5
| | | | | | | The RFC indicates that username and passwords may be encoded. http://tools.ietf.org/html/rfc2396#section-3.2.2 Found this trying to use the mysql://username:password@host:port/db and having special characters in the password which needed to be URI encoded.
* Remove ActiveRecord::ModelJon Leighton2012-10-261-28/+0
| | | | | | | | | | In the end I think the pain of implementing this seamlessly was not worth the gain provided. The intention was that it would allow plain ruby objects that might not live in your main application to be subclassed and have persistence mixed in. But I've decided that the benefit of doing that is not worth the amount of complexity that the implementation introduced.
* Fix incorrect markdown by removing extra space.Uģis Ozols2012-10-241-1/+1
|
* Revert "Get rid of the ActiveRecord::Model::DeprecationProxy thing."Jeremy Kemper2012-10-201-8/+1
| | | | This reverts commit 83846838252397b3781eed165ca301e05db39293.
* Get rid of the ActiveRecord::Model::DeprecationProxy thing.Jon Leighton2012-10-191-1/+8
| | | | | | | | | | | | | | | | | I think it's going to be too much pain to try to transition the :active_record load hook from executing against Base to executing against Model. For example, after Model is included in Base, and modules included in Model will no longer get added to the ancestors of Base. So plugins which wish to be compatible with both Model and Base should use the :active_record_model load hook which executes *before* Base gets loaded. In general, ActiveRecord::Model is an advanced feature at the moment and probably most people will continue to inherit from ActiveRecord::Base for the time being.
* Rename the partial_updates config to partial_writesJon Leighton2012-10-191-0/+4
| | | | This reflects the fact that it now impact inserts as well as updates.
* nodoc the first_or_create methods and document alternativesJon Leighton2012-10-191-3/+11
|
* Add Relation#find_or_create_by and friendsJon Leighton2012-10-191-2/+32
| | | | | | | This is similar to #first_or_create, but slightly different and a nicer API. See the CHANGELOG/docs in the commit. Fixes #7853
* Fix bug with presence validation of associations.Scott Willson2012-10-161-0/+5
| | | | Would incorrectly add duplicated errors when the association was blank. Bug introduced in 1fab518c6a75dac5773654646eb724a59741bc13.
* Merge pull request #7371 from csmuc/fix_dup_validation_errorsSantiago Pastorino2012-10-161-0/+5
|\ | | | | Dup'ed ActiveRecord objects may not share the errors object
| * Call super to nullify the reference to the original errors object in the ↵Christian Seiler2012-10-161-0/+5
| | | | | | | | dup'ed object (call ActiveModel::Validations#initialize_dup). Closes #7291
* | Move changelog entry from #7439 to the top [ci skip]Carlos Antonio da Silva2012-10-151-6/+6
| |
* | ActiveRecord: sum expression returns string '0' for no records, fixedTim Macfarlane2012-10-151-0/+5
| |
* | #7914 Add change of previous commit to CHANGELOG.mdArturo Pie2012-10-131-0/+4
| |
* | learn ActiveRecord::QueryMethods#order work with hash argumentsTima Maslyuchenko2012-10-121-0/+10
|/
* Add CHANGELOG entry for "Fixtures" -> "FixtureSet"Alexey Muranov2012-10-071-1/+13
|
* PostgreSQL, quote table names when fetching the primary key. Closes #5920Yves Senn2012-10-051-0/+5
|
* Fix CHANGELOG entry [ci skip]Rafael Mendonça França2012-10-041-4/+4
|
* Count returns 0 without querying if parent is not savedFrancesco Rodriguez2012-10-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Patches `CollectionAssociation#count` to return 0 without querying if the parent record is new. Consider the following code: class Account has_many :dossiers end class Dossier belongs_to :account end a = Account.new a.dossiers.build # before patch a.dossiers.count # SELECT COUNT(*) FROM "dossiers" WHERE "dossiers"."account_id" IS NULL # => 0 # after a.dosiers.count # fires without sql query # => 0 Fixes #1856.
* Fix reset_counters() crashing on has_many :through associations.lulalala2012-10-021-0/+5
| | | | | The counter column name in the intermediate model need to be access via the through reflection.
* Add missing CHANGELOG entry removed by mistake at 7f3b475 [ci skip]Rafael Mendonça França2012-09-281-11/+20
|
* Support for partial inserts.Jon Leighton2012-09-281-0/+13
| | | | | | | | | | | When inserting new records, only the fields which have been changed from the defaults will actually be included in the INSERT statement. The other fields will be populated by the database. This is more efficient, and also means that it will be safe to remove database columns without getting subsequent errors in running app processes (so long as the code in those processes doesn't contain any references to the removed column).
* Add #update_columns entry to AR Changelog.Sebastian Martinez2012-09-281-0/+11
|
* Add CHANGELOG entry and update the guideJohn Foley2012-09-231-0/+4
|
* Revert "Fix find_in_batches with customized primary_key"Santiago Pastorino2012-09-211-15/+0
| | | | | | | This reverts commit 761bc751d31c22e2c2fdae2b4cdd435b68b6d783. This commit wasn't fixing any issue just using the same table for different models with different primary keys.
* Support for specifying transaction isolation levelJon Leighton2012-09-211-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If your database supports setting the isolation level for a transaction, you can set it like so: Post.transaction(isolation: :serializable) do # ... end Valid isolation levels are: * `:read_uncommitted` * `:read_committed` * `:repeatable_read` * `:serializable` You should consult the documentation for your database to understand the semantics of these different levels: * http://www.postgresql.org/docs/9.1/static/transaction-iso.html * https://dev.mysql.com/doc/refman/5.0/en/set-transaction.html An `ActiveRecord::TransactionIsolationError` will be raised if: * The adapter does not support setting the isolation level * You are joining an existing open transaction * You are creating a nested (savepoint) transaction The mysql, mysql2 and postgresql adapters support setting the transaction isolation level. However, support is disabled for mysql versions below 5, because they are affected by a bug (http://bugs.mysql.com/bug.php?id=39170) which means the isolation level gets persisted outside the transaction.
* remove unnecessary entry and make minor edits to AR/CHANGELOG [ci skip]Francesco Rodriguez2012-09-201-7/+2
|
* rename AR::Model::Tag to AR::Tag - fixes #7714Francesco Rodriguez2012-09-201-0/+5
|
* Update changelogs to add entries about strong_parameters integrationGuillermo Iguaran2012-09-191-0/+14
|
* Improve the CHANGELOG entry for #6971Rafael Mendonça França2012-09-191-1/+14
|
* fix querying with an empty hashDamien Mathieu2012-09-191-0/+2
| | | | Closes #6960
* ActiveRecord -> Active RecordXavier Noria2012-09-181-1/+1
|
* Use the CHANGELOG convention [ci skip]Rafael Mendonça França2012-09-171-3/+5
|
* Merge pull request #7661 from ernie/build-join-records-on-unsaved-hmtRafael Mendonça França2012-09-171-0/+5
|\ | | | | Fix collection= on hm:t join models when unsaved
| * Fix collection= on hm:t join models when unsavedErnie Miller2012-09-171-0/+5
| | | | | | | | | | | | If assigning to a has_many :through collection against an unsaved object using the collection=[<array_of_items>] syntax, the join models were not properly created, previously.
* | improve AR/CHANGELOG [ci skip]Francesco Rodriguez2012-09-161-44/+68
| |
* | Merge pull request #7547 from danmcclain/pg-arraysRafael Mendonça França2012-09-161-0/+31
|\ \ | |/ |/| Adds migration and type casting support for PostgreSQL Array datatype
| * Moves column dump specific code to a module included in AbstractAdapterDan McClain2012-09-141-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having column related schema dumper code in the AbstractAdapter. The code remains the same, but by placing it in the AbstractAdapter, we can then overwrite it with Adapter specific methods that will help with Adapter specific data types. The goal of moving this code here is to create a new migration key for PostgreSQL's array type. Since any datatype can be an array, the goal is to have ':array => true' as a migration option, turning the datatype into an array. I've implemented this in postgres_ext, the syntax is shown here: https://github.com/dockyard/postgres_ext#arrays Adds array migration support Adds array_test.rb outlining the test cases for array data type Adds pg_array_parser to Gemfile for testing Adds pg_array_parser to postgresql_adapter (unused in this commit) Adds schema dump support for arrays Adds postgres array type casting support Updates changelog, adds note for inet and cidr support, which I forgot to add before Removing debugger, Adds pg_array_parser to JRuby platform Removes pg_array_parser requirement, creates ArrayParser module used by PostgreSQLAdapter
* | Don't explain except normal CRUD sql.kennyj2012-09-171-0/+5
| |
* | Fix find_in_batches with customized primary_keyToshiyuki Kawanishi2012-09-161-0/+15
|/