aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove deprecated conditions parameter from #delete_allRafael Mendonça França2016-12-291-1/+1
|
* Remove deprecated conditions parameter from `#destroy_all`Rafael Mendonça França2016-12-291-0/+4
|
* Remove deprecated support to passing arguments to `#select` when a block is ↵Rafael Mendonça França2016-12-291-0/+4
| | | | provided.
* Remove deprecated support to query using commas on LIMITRafael Mendonça França2016-12-291-0/+4
|
* Remove deprecated support to passing a class as a value in a queryRafael Mendonça França2016-12-291-0/+4
|
* Raises IrreversibleOrderError when using last with an irreversible orderRafael Mendonça França2016-12-291-0/+5
|
* Raise when a through association has an ambiguous reflection nameRafael Mendonça França2016-12-291-0/+4
|
* Raises when `ActiveRecord::Migration` is inherited directly.Rafael Mendonça França2016-12-291-0/+4
|
* Remove original_exception from ActiveRecord::StatementInvalidRafael Mendonça França2016-12-291-0/+5
|
* `#tables` and `#table_exists?` and returns only tables and not viewsRafael Mendonça França2016-12-291-0/+6
|
* Remove deprecated `name` argument from `#tables`Rafael Mendonça França2016-12-291-0/+4
|
* Remove deprecated support to passing a column to #quoteRafael Mendonça França2016-12-291-0/+4
|
* Set time as a timezone aware type and remove related deprecationRafael Mendonça França2016-12-291-0/+5
|
* Remove deprecated force reload argument in association readersRafael Mendonça França2016-12-291-0/+4
|
* Remove deprecated i18n scopes in Active RecordRafael Mendonça França2016-12-291-0/+5
|
* [ci skip] Add changelog for 261e94b.Kasper Timm Hansen2016-12-291-0/+7
| | | | [ *Kasper Timm Hansen* & *Kir Shatrov* ]
* Small edits to activerecord/CHANGELOG.mdJon Moss2016-12-271-2/+2
| | | | | | | [ci skip] - add period where necessary - add backticks where necessary
* fix QueryCache nil dupRichard Monette2016-12-151-0/+10
| | | | | | | | | | | | | | make sql statements frozen dup if arel is not our string expect runtime error dont wrap runtime error in invalid log errors will now be treated as runtime errors update changelog
* Add CHANGELOG entry to #27042Rafael Mendonça França2016-12-131-0/+4
| | | | [ci skip]
* Add a changelog entry for #26687 [ci skip]Ryuta Kamizono2016-12-121-0/+7
|
* Add a changelog entry for #25227 [ci skip]Ryuta Kamizono2016-12-101-0/+4
|
* Add a changelog entry for #25451 [ci skip]Ryuta Kamizono2016-12-101-8/+13
|
* Emulate db trigger behaviour for after_commit :destroy, :updateStefan Budeanu2016-12-091-0/+8
| | | | | | Race conditions can occur when an ActiveRecord is destroyed twice or destroyed and updated. The callbacks should only be triggered once, similar to a SQL database trigger.
* Merge pull request #26696 from iainbeeston/only-ruby-types-in-activemodelSean Griffin2016-12-081-0/+4
|\ | | | | | | Moved database-specific ActiveModel types into ActiveRecord
| * Moved database-specific ActiveModel types into ActiveRecordIain Beeston2016-10-141-0/+4
| | | | | | | | ie. DecimalWithoutScale, Text and UnsignedInteger
* | Check whether the current attribute being write is aliased or not before writingPrathamesh Sonpatki2016-12-091-1/+6
| | | | | | | | - If aliased, then use the aliased attribute name.
* | Check whether the current attribute being read is aliased or not before readingPrathamesh Sonpatki2016-12-081-1/+8
| | | | | | | | | | - If aliased, then use the aliased attribute name. - Fixes #26417.
* | Make pg adapter use bigserial for pk by defaultPavel Pravosud2016-12-051-0/+4
| |
* | Fix issue number from becoming markdown headernanaya2016-12-011-2/+2
| | | | | | | | The alternative is escaping it but moving around the text seems a bit simpler.
* | Make the second argument to `attribute` optionalSean Griffin2016-11-301-0/+6
| | | | | | | | | | | | | | | | While working on updating Paper Trail for 5.1 compatibility, I noticed that I was required to pass a second argument to `attribute`. I didn't intend for this to be the case, as `attribute :foo` is totally reasonable shorthand for "I want `attr_accessor :foo`, but also have it work with things like `.attributes` and `ActiveRecord::Dirty`"
* | Fix that unsigned with zerofill is treated as signedRyuta Kamizono2016-11-271-0/+6
| | | | | | | | Fixes #27125.
* | fix the uniqueness validation scope with a polymorphic associationSergey Alekseev2016-11-261-0/+4
| | | | | | | | https://gist.github.com/sergey-alekseev/946657ebdb5e58d1bee115714056ec96
* | Add test for collection *_ids= setter when association primary key setDominic Cleal2016-11-241-0/+4
| | | | | | | | | | | | | | | | Fixes casting of IDs to the data type of the association primary key, rather than then the data type of the model's primary key. (Tests use a string primary key on the association, rather than an int.) Tests issue #20995
* | Restore RecordNotFound when *_ids= can't find records by IDDominic Cleal2016-11-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9c9fb19 changed the behaviour of the _ids= setters for associations to raise an AssociationTypeMismatch when unknown IDs are given: Class: <ActiveRecord::AssociationTypeMismatch> Message: <"Developer(#43811860) expected, got NilClass(#16732720)"> This restores the original ActiveRecord::RecordNotFound exception with a much clearer error message: Class: <ActiveRecord::RecordNotFound> Message: <"Couldn't find all Developers with 'id': (1, -9999) [WHERE \"contracts\".\"company_id\" = ?] (found 1 results, but was looking for 2)"> Fixes #25719
* | For `PostgreSQL >= 9.4` use `gen_random_uuid()`Yaw Boakye2016-11-221-0/+5
| | | | | | | | | | | | | | | | | | | | Since 9.4, PostgreSQL recommends using `pgcrypto`'s `gen_random_uuid()` to generate version 4 UUIDs instead of the functions in the `uuid-ossp` extension. These changes uses the appropriate UUID function depending on the underlying PostgreSQL server's version, while maintaining `uuid_generate_v4()` in older migrations.
* | Introduce `reload_<association>` reader for singular associations.Yves Senn2016-11-221-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch brings back the functionality of passing true to the association proxy. The behavior was deprecated with #20888 and scheduled for removal in Rails 5.1. The deprecation mentioned that instead of `Article.category(true)` one should use `article#reload.category`. Unfortunately the alternative does not expose the same behavior as passing true to the reader did. Specifically reloading the parent record throws unsaved changes and other caches away. Passing true only affected the association. This is problematic and there is no easy workaround. I propose to bring back the old functionality by introducing this new reader method for singular associations.
* | changelog entry for fc4c15d [ci skip]Yves Senn2016-11-211-0/+5
| | | | | | | | https://github.com/rails/rails/commit/fc4c15d823b112cc440cbd9a4288e1a389c138da
* | Merge pull request #26981 from kamipo/should_not_except_order_for_existsRafael França2016-11-171-1/+2
|\ \ | | | | | | Should except `:distinct` rather than `:order` for `exists?`
| * | Should except `:distinct` rather than `:order` for `exists?`Ryuta Kamizono2016-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Records fetching order is very important for performance if `limit` is presented. Should not except the order in the case. And `exists?` replaces select list to `1 AS one` therefore `:distinct` is useless (`DISTINCT 1 AS one`). And PostgreSQL raises the following error if `:distinct` and `:order` are used in the same time. ``` ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list ```
* | | Support AC::Parameters for PG HStoreJon Moss2016-11-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported via #26904, there is a regression in how values for Postgres' HStore column type are being processed, beginning in Rails 5. Currently, the way that Active Record checks whether or not values need to be serialized and put into the correct storage format is whether or not it is a `Hash` object. Since `ActionController::Parameters` no longer inherits from `Hash` in Rails 5, this conditional now returns false. To remedy this, we are now checking to see whether the `value` parameters being passed in responds to a certain method, and then calling the `serialize` method, except this time with a real Hash object. Keeping things DRY! Fixes #26904.
* | | Changelog editsVipul A M2016-11-121-7/+7
|/ /
* | Add ActiveRecord::Base.connection_pool.statPavel2016-11-091-0/+9
| |
* | Avoid `unscope(:order)` when `limit_value` is presented for `count`Ryuta Kamizono2016-11-061-2/+11
| | | | | | | | | | If `limit_value` is presented, records fetching order is very important for performance. Should not unscope the order in the case.
* | fix datatime errorSen-Zhang2016-11-011-0/+5
| |
* | allow ActiveRecord::Core#slice to use array argCohen Carlisle2016-10-311-0/+4
| |
* | Merge PR #19759Arthur Neves2016-10-281-0/+7
|\ \ | | | | | | | | | Fix for has_and_belongs_to_many & has_many_through associations
| * | Fix for has_and_belongs_to_many & has_many_through associations while ↵Mehmet Emin İNAÇ2016-02-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | partial_writes is false This will fix #19663 Also with this fix, active record does not fire unnecassary update queries while partial_writes is true
* | | Revert "Made ActiveRecord consistently use ActiveRecord::Type (not"Sean Griffin2016-10-231-4/+0
| | | | | | | | | | | | | | | | | | This reverts commit 671eb742eec77b5c8281ac2a2e3976ef32a6e424. This is not a change we would like moving forward.
* | | Fix regression caused due to removal of select method from CollectionAssociationPrathamesh Sonpatki2016-10-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CollectionAssociation#select was removed in https://github.com/rails/rails/pull/25989 in favor of QueryMethods#select but it caused a regression when passing arguments to select and a block. - This used to work earlier in Rails 4.2 and Rails 5. See gist https://gist.github.com/prathamesh-sonpatki/a7df922273473a77dfbc742a4be4b618. - This commit restores the behavior of Rails 4.2 and Rails 5.0.0 to allow passing arguments and block at the same time but also deprecates it. - Because, these arguments do not have any effect on the output of select when select is used with a block. - Updated documentation to remove the example passing arguments and block at the same time to `CollectionProxy#select`.
* | | Added ability update locking_column valuebogdanvlviv2016-10-211-0/+5
| | |