2015/10/15分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
fix RDoc markup in ConnectionPool
. [ci skip]
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
のdocの修正です。
各メソッドのdoc内の等幅フォントの表示、に""を使用していたのを
+を使用するよう修正、途中スペースが入る文に
+を使用していたのを
`を使用するようまとめて修正しています。
applies new doc guidelines to Active Record.
Active Recordのdocの修正です。
各doc内の他のメソッドについて言及している箇所で、その言及しているメソッドにリンクをはるようまとめて修正しています。
migrations Class methods have nodoc, fix it for API [ci skip]
railties/lib/rails/generators/migration.rb
のdocの修正です。
Migration::ClassMethods
module配下の各メソッドに:nodoc:
を設定していたのを、module自体に:nodoc:
を設定するよう修正しています。
freeze the column name to drop string allocations in dirty checks
activerecord/lib/active_record/connection_adapters/column.rb
の修正です。
ActiveRecord::ConnectionAdapters::Column#initialize
メソッドでname
をfreeze
するよう修正しています。
dirty checkで不要なStringのインスタンスを生成しないようにする為に、対応したとの事です。
Add deprecation warning to ActiveRecord::Relation#update
activerecord/lib/active_record/relation.rb
の修正です。
ActiveRecord::Relation#update
の引数に、idではなくActiveRecord::Base
のインスタンスを渡した場合に、deprecation warningを表示するよう修正しています。
user = User.first User.update(user, nickname: "Tenderlove") # => DEPRECATION WARNING: You are passing an instance of ActiveRecord::Base to `update`. Please pass the id of the object by calling `.id`.
元々は、update
の内部でfind
メソッドを呼び出している為に、find
メソッドに関する`deprecation warningが出てしまっていました。
user = User.first User.update(user, nickname: "Tenderlove") # => DEPRECATION WARNING: You are passing an instance of ActiveRecord::Base to `find`. Please pass the id of the object by calling `.id`.
ただ、update
メソッドを使用しているのに、find
メソッドに関するメッセージが表示されるのはわかりずらいだろう、という事で、update
でdeprecation warningを表示するよう対応しています。