diff options
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 65 |
1 files changed, 63 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 3bb4b5236e..d59101d621 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,43 @@ +* Delegate `empty?`, `none?` and `one?`. Now they can be invoked as model class methods. + + Example: + + # When no record is found on the table + Topic.empty? # => true + Topic.none? # => true + + # When only one record is found on the table + Topic.one? # => true + + *Kenta Shirai* + +* The form builder now properly displays values when passing a proc form + default to the attributes API. + + Fixes #24249. + + *Sean Griffin* + +* The schema cache is now cleared after the `db:migrate` task is run. + + Closes #24273. + + *Chris Arcand* + +* MySQL: strict mode respects other SQL modes rather than overwriting them. + Setting `strict: true` adds `STRICT_ALL_TABLES` to `sql_mode`. Setting + `strict: false` removes `STRICT_TRANS_TABLES`, `STRICT_ALL_TABLES`, and + `TRADITIONAL` from `sql_mode`. + + *Ryuta Kamizono* + +* Execute default_scope defined by abstract class in the context of subclass. + + Fixes #23413. + Fixes #10658. + + *Mehmet Emin İNAÇ* + * Fix an issue when preloading associations with extensions. Previously every association with extension methods was transformed into an instance dependent scope. This is no longer the case. @@ -41,6 +81,12 @@ ## Rails 5.0.0.beta3 (February 24, 2016) ## +* Save many-to-many objects based on association primary key. + + Fixes #20995. + + *himesh-r* + * Ensure that mutations of the array returned from `ActiveRecord::Relation#to_a` do not affect the original relation, by returning a duplicate array each time. @@ -222,6 +268,21 @@ ## Rails 5.0.0.beta1 (December 18, 2015) ## +* Limit record touching to once per transaction. + + If you have a parent/grand-parent relation like: + + Comment belongs_to :message, touch: true + Message belongs_to :project, touch: true + Project belongs_to :account, touch: true + + When the lowest entry(`Comment`) is saved, now, it won't repeat the touch + call multiple times for the parent records. + + Related #18606. + + *arthurnn* + * Order the result of `find(ids)` to match the passed array, if the relation has no explicit order defined. @@ -496,13 +557,13 @@ * Add option to index errors in nested attributes For models which have nested attributes, errors within those models will - now be indexed if :index_errors is specified when defining a + now be indexed if `:index_errors` is specified when defining a has_many relationship, or if its set in the global config. Example: class Guitar < ActiveRecord::Base - has_many :tuning_pegs + has_many :tuning_pegs, index_errors: true accepts_nested_attributes_for :tuning_pegs end |