aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
Commit message (Collapse)AuthorAgeFilesLines
...
* | Fixes the `Relation#exists?` to work with polymorphic associations.Kassio Borges2014-08-181-0/+6
| | | | | | | | Fixes #15821.
* | Add option to stop swallowing errors on callbacks.Arthur Neves2014-08-181-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, Active Record will rescue any errors raised within after_rollback/after_create callbacks and print them to the logs. Next versions of rails will not rescue those errors anymore, and just bubble them up, as the other callbacks. This adds a opt-in flag to enable that behaviour, of not rescuing the errors. Example: # For not swallow errors in after_commit/after_rollback config.active_record.errors_in_transactional_callbacks = true [fixes #13460]
* | Merge pull request #16458 from chancancode/ar_fix_reserved_inheritanceGodfrey Chan2014-08-171-0/+8
|\ \ | | | | | | | | | | | | | | | | | | Fixed issue w/custom accessors + reserved name + inheritance Conflicts: activerecord/CHANGELOG.md
| * | Fixed issue w/custom accessors + reserved name + inheritanceGodfrey Chan2014-08-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed an issue where custom accessor methods (such as those generated by `enum`) with the same name as a global method are incorrectly overridden when subclassing. This was partially fixed in 4155431 then broken again by e5f15a8. Fixes #16288.
* | | Don't expose these new APIs yet (added in 877ea78 / #16189)Godfrey Chan2014-08-161-0/+5
| | | | | | | | | | | | | | | | | | | | | WARNING: don't use them! They might change or go away between future beta/RC/ patch releases! Also added a CHANGELOG entry for this.
* | | Fix regression on after_commit in nested transactions.Arthur Neves2014-08-151-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | after_commit should not run in nested transactions, however they should run once the outermost transaction gets committed. This patch fixes the problem copying the records from the Savepoint to its parent. So the RealTransaction will have all records that needs to run callbacks on it. [fixes #16425]
* | | Merge pull request #8813 from ↵Yves Senn2014-08-141-0/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | greyblake/dont_write_timestamps_if_they_are_not_attributes Write timestamps only if there are timestamps columns Conflicts: activerecord/CHANGELOG.md
| * | | Do not try to write timestamps if they are missing #8813Potapov Sergey2014-02-161-0/+6
| | | |
* | | | `index_exists?` with `:name` checks specified columns.Yves Senn2014-08-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Yves Senn & Matthew Draper] The column check was embodied in the defaul index name. If the :name option was used, the specified columns were not verified at all. Given: ``` assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma) ``` That index could have been defined on any field, not necessarily on `:foo_id`.
* | | | update error message to reflect that the record could have been destroyedlsylvester2014-08-111-0/+6
| |/ / |/| |
* | | Define id_was to get the previous value of the primary keyRafael Mendonça França2014-08-061-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when we call id_was and we have a custom primary key name Active Record will return the current value of the primary key. This make impossible to correctly do an update operation if you change the id. Fixes #16413
* | | schema rake tasks are specific about the configuration to act on.Yves Senn2014-08-061-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rake tasks and the `DatabaseTakss` adapter classes used to assume a configuration at some places. This forced the rake tasks to establish a specific connection before calling into `load_schema`. After #15394 this started to cause issues because it could `purge` the wrong database before loading the schema.
* | | Revert "Revert "Merge pull request #15394 from ↵Yves Senn2014-08-061-1/+8
| | | | | | | | | | | | | | | | | | morgoth/fix-automatic-maintaining-test-schema-for-sql-format"" This reverts commit 5c87b5c5248154cf8aa76cce9a24a88769de022d.
* | | Merge pull request #16333 from ↵Yves Senn2014-08-041-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | joker1007/fix_decimal_cast_from_float_with_large_precision Fix type casting to Decimal from Float with large precision Conflicts: activerecord/CHANGELOG.md
| * | | Fix type casting to Decimal from Float with ...joker10072014-08-011-0/+4
| | | | | | | | | | | | | | | | | | | | When I defines large precision column at RDBMS, I assigns float value, raise ArgumentError (precision too large).
* | | | Deprecate source_macroeileencodes2014-08-021-0/+8
|/ / / | | | | | | | | | | | | | | | `source_macro` is no longer used in any ActiveRecord code. I've chosen to deprecate it because it was not marked as nodoc and may be in use outside of rails source.
* | | No verbose backtrace by db:drop when database does not exist.Kenn Ejima2014-07-271-0/+6
| | |
* | | Merge pull request #16220 from pcreux/postgresql-jsonb-supportYves Senn2014-07-251-0/+10
|\ \ \ | | | | | | | | | | | | Add support for Postgresql JSONB
| * | | Add support for Postgresql JSONBPhilippe Creux2014-07-241-0/+10
|/ / / | | | | | | | | | [Philippe Creux, Chris Teague]
* | | fix, mysql `db:purge` respects `Rails.env`.Yves Senn2014-07-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this method always established a connection to the test database. This resulted in buggy behavior when combined with other tasks like `bin/rake db:schema:load`. This was one of the reasons why #15394 (22e9a91189af2c4e6217a888e77f22a23d3247d1) was reverted: > I’ve replicated it on a new app by the following commands: 1) rails generate model post:title, 2) rake db:migrate, 3) rake db:schema:load, 4) rails runner ‘puts Post.first’. The last command goes boom. Problem is that rake db:schema:load wipes the database, and then doesn’t actually restore it. This is all on MySQL. There’s no problem with SQLite. -- DHH https://github.com/rails/rails/commit/22e9a91189af2c4e6217a888e77f22a23d3247d1#commitcomment-6834245
* | | clenaup, unify CHANGELOG format. [ci skip]Yves Senn2014-07-241-5/+7
| | |
* | | pg, `change_column_default, :table, :column, nil` issues `DROP DEFAULT`.Yves Senn2014-07-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #16261. [Matthew Draper, Yves Senn] Using `DEFAULT NULL` results in the same behavior as `DROP DEFAULT`. However, PostgreSQL will cast the default to the columns type, which leaves us with a default like "default NULL::character varying". /cc @matthewd
* | | Merge pull request #16231 from Envek/type_in_referencesYves Senn2014-07-221-0/+11
|\ \ \ | | | | | | | | | | | | | | | | | | | | * Allow to specify a type for foreign key column in migrations * unified the docs * some cleanup in CHANGELOG
| * | | Allow to specify a type for foreign key column in migrationsAndrey Novikov2014-07-221-0/+11
|/ / / | | | | | | | | | [Andrey Novikov & Łukasz Sarnacki]
* | | create_join_table uses same logic as HABTM reflectionsStefan Kanev2014-07-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | Before this change, create_join_table would not remove the common prefix in the join table name, unlike ActiveRecord::Reflections. A HABTM between Music::Artist and Music::Record would use a table music_artists_records, while create_join table would create music_artists_music_records.
* | | Merge pull request #15762 from arthurnn/better_error_on_bad_alias_methodMatthew Draper2014-07-181-0/+5
|\ \ \ | | | | | | | | | | | | Dont swallow errors when bad alias_method
| * | | Dont swallow errors when bad alias_methodArthur Neves2014-06-241-0/+5
| | | |
* | | | Merge pull request #15944 from seuros/uuidRafael Mendonça França2014-07-161-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Treat invalid uuid as nil Conflicts: activerecord/CHANGELOG.md
| * | | | Treat invalid uuid as nilAbdelkader Boudih2014-07-141-0/+4
| | | | |
* | | | | Merge branch 'master' of git://github.com/rails/railsGodfrey Chan2014-07-151-0/+6
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md
| * \ \ \ \ Merge branch 'jbrowning-fix_mariadb_rename_index'Rafael Mendonça França2014-07-151-0/+6
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Closes #15936
| | * | | | | Fix version detection for RENAME INDEX support. Fixes #15931.Jeff Browning2014-07-151-0/+6
| | |/ / / /
* | / / / / Revert "Revert "Merge pull request #16059 from jenncoop/json-serialized-attr""Godfrey Chan2014-07-151-0/+41
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6f3c64eeb1dc8288dae49f114aaf619adc7dcb7f. Conflicts: activerecord/CHANGELOG.md
* / / / / Add CHANGELOG entry for #15266Godfrey Chan2014-07-151-0/+5
|/ / / /
* | | | Merge pull request #16127 from Envek/fix_16111Matthew Draper2014-07-141-0/+7
|\ \ \ \ | | | | | | | | | | Dump PostgreSQL primary key with custom function as a default.
| * | | | Dump PostgreSQL primary key with custom function as a default.Andrey Novikov2014-07-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, if use pgcrypto extension in PostgreSQL 9.4 beta 1, where uuid-ossp extension isn't available for moment of writing, and thus to use a gen_random_uuid() method as a primary key default. In this case schema dumper wasn't able to correctly reconstruct create_table statement and lost primary key constraint on schema load. Fixes #16111.
* | | | | Synced 4.2 release notes with the latest commits.Godfrey Chan2014-07-111-1/+1
|/ / / / | | | | | | | | | | | | | | | | Also reordered some of the items to put newer ones on top (same order as CHANGELOGs), which makes it easier to diff while we are still working on it.
* | | | [ci skip] Add changelog for PR #14899eileencodes2014-07-081-0/+15
| | | | | | | | | | | | | | | | The changelog entry for #14899 was missing.
* | | | active_record: Type cast booleans and durations for string columns.Dylan Thacker-Smith2014-07-061-0/+11
| | | |
* | | | Revert "Merge pull request #16059 from jenncoop/json-serialized-attr"Godfrey Chan2014-07-051-41/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a03097759bd7103bb9db253e7ba095f011453f75. This needs more work before it would work correctly on master.
* | | | Merge pull request #16059 from jenncoop/json-serialized-attrGodfrey Chan2014-07-051-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue with ActiveRecord serialize object as JSON Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/attribute_methods/serialization.rb
* | | | CHANGELOG and release notes entry for #16056Sean Griffin2014-07-041-0/+5
| | | |
* | | | Merge pull request #16028 from ↵Rafael Mendonça França2014-07-041-0/+5
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cade/fix_counter_cache_count_with_association_selects Add `:all` argument to `count` in `reset_counters` Conflicts: activerecord/CHANGELOG.md
| * | | | Add `:all` argument to `count` in `reset_counters`Cade Truitt2014-07-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this fix, if an association had a scope with a `select`, calls to `reset_counters` would generate invalid SQL and throw: ActiveRecord::StatementInvalid: [$DB_ADAPTER]: wrong number of arguments to function COUNT() References #10710, #13648
* | | | | After find-via-reload, the record is not newMatthew Draper2014-07-051-0/+6
|/ / / /
* | | | Revert "Merge pull request #15394 from ↵Rafael Mendonça França2014-07-021-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | morgoth/fix-automatic-maintaining-test-schema-for-sql-format" This reverts commit 46139d33c06715e74ad450428ece3ee84da98579, reversing changes made to 8f247871bb18b2e3036a05df5f62cbfe3b402586. Conflicts: activerecord/CHANGELOG.md
* | | | Merge pull request #15934 from seuros/renameRafael Mendonça França2014-06-271-0/+4
|\ \ \ \ | | | | | | | | | | | | | | | rename primary key sequence only if it exists
| * | | | rename sequence only if it existsAbdelkader Boudih2014-06-271-0/+4
|/ / / /
* | | | Merge pull request #12450 from iantropov/masterRafael Mendonça França2014-06-271-0/+7
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug, when ':dependent => :destroy' violates foreign key constraints Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/associations/builder/association.rb activerecord/lib/active_record/associations/builder/has_one.rb
| * | | | Fix bug, when ':dependent => :destroy' option violates foreign key ↵Ivan Antropov2013-10-261-0/+7
| | | | | | | | | | | | | | | | | | | | constraints, issue #12380