diff options
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 117 |
1 files changed, 103 insertions, 14 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 5647204859..736745c3cd 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,92 @@ +* Fix redefine a has_and_belongs_to_many inside inherited class + Fixing regression case, where redefining the same has_an_belongs_to_many + definition into a subclass would raise. + + Fixes #14983. + + *arthurnn* + +* Add a properties API to allow custom types and type casting behavior + to be specified. Will enable many edge cases to be deprecated, and + allow for additional interesting features in the future. + + *Sean Griffin* + +* Fix has_and_belongs_to_many public reflection. + When defining a has_and_belongs_to_many, internally we convert that to two has_many. + But as `reflections` is a public API, people expect to see the right macro. + + Fixes #14682. + + *arthurnn* + +* Fixed serialization for records with an attribute named `format`. + + Fixes #15188. + + *Godfrey Chan* + +* When a `group` is set, `sum`, `size`, `average`, `minimum` and `maximum` + on a NullRelation should return a Hash. + + *Kuldeep Aggarwal* + +* Fixed serialized fields returning serialized data after being updated with + `update_column`. + + *Simon Hørup Eskildsen* + +* Fixed polymorphic eager loading when using a String as foreign key. + + Fixes #14734. + + *Lauro Caetano* + +* Change belongs_to touch to be consistent with timestamp updates + + If a model is set up with a belongs_to: touch relationship the parent + record will only be touched if the record was modified. This makes it + consistent with timestamp updating on the record itself. + + *Brock Trappitt* + +* Fixed the inferred table name of a has_and_belongs_to_many auxiliar + table inside a schema. + + Fixes #14824 + + *Eric Chahin* + +* Remove unused `:timestamp` type. Transparently alias it to `:datetime` + in all cases. Fixes inconsistencies when column types are sent outside of + `ActiveRecord`, such as for XML Serialization. + + *Sean Griffin* + +* Fix bug that added `table_name_prefix` and `table_name_suffix` to + extension names in PostgreSQL when migrating. + + *Joao Carlos* + +* The `:index` option in migrations, which previously was only available for + `references`, now works with any column types. + + *Marc Schütz* + +* Add support for counter name to be passed as parameter on `CounterCache::ClassMethods#reset_counters`. + + *jnormore* + +* Restrict deletion of record when using `delete_all` with `uniq`, `group`, `having` + or `offset`. + + In these cases the generated query ignored them and that caused unintended + records to be deleted. + + Fixes #11985. + + *Leandro Facchinetti* + * Floats with limit >= 25 that get turned into doubles in MySQL no longer have their limit dropped from the schema. @@ -5,7 +94,7 @@ *Aaron Nelson* -* Fix how to calculate associated class name when using namespaced `has_and_belongs_to_many` +* Fix how to calculate associated class name when using namespaced has_and_belongs_to_many association. Fixes #14709. @@ -58,7 +147,7 @@ *Innokenty Mikhailov* -* Allow the PostgreSQL adapter to handle bigserial pk types again. +* Allow the PostgreSQL adapter to handle bigserial primary key types again. Fixes #10410. @@ -73,10 +162,10 @@ *Yves Senn* -* Fixed HABTM's CollectionAssociation size calculation. +* Fixed has_and_belongs_to_many's CollectionAssociation size calculation. - HABTM should fall back to using the normal CollectionAssociation's size - calculation if the collection is not cached or loaded. + has_and_belongs_to_many should fall back to using the normal CollectionAssociation's + size calculation if the collection is not cached or loaded. Fixes #14913, #14914. @@ -120,10 +209,10 @@ *Eric Chahin*, *Aaron Nelson*, *Kevin Casey* -* Stringify all variable keys of mysql connection configuration. +* Stringify all variables keys of MySQL connection configuration. - When the `sql_mode` variable for mysql adapters is set in the configuration - as a `String`, it was ignored and overwritten by the strict mode option. + When `sql_mode` variable for MySQL adapters set in configuration as `String` + was ignored and overwritten by strict mode option. Fixes #14895. @@ -398,12 +487,6 @@ *Cody Cutrer*, *Steve Rice*, *Rafael Mendonça Franca* -* Save `has_one` association even if the record doesn't changed. - - Fixes #14407. - - *Rafael Mendonça França* - * Use singular table name in generated migrations when `ActiveRecord::Base.pluralize_table_names` is `false`. @@ -482,6 +565,12 @@ *Troy Kruthoff*, *Lachlan Sylvester* +* Only save has_one associations if record has changes. + Previously after save related callbacks, such as `#after_commit`, were triggered when the has_one + object did not get saved to the db. + + *Alan Kennedy* + * Allow strings to specify the `#order` value. Example: |