2015/11/07分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
call local_cache 1 time instead of 3 times
activesupport/lib/active_support/cache/strategy/local_cache.rb
の修正です。
LocalCache#read_entry
メソッドで、local_cache
メソッドを複数回呼んでいたのを、一度呼んだ結果を変数に保持するようにし、メソッド呼び出しを一度だけで済むよう修正しています。
Clarify automatic creation/deletion of join models for has_many through
rails guideのActive Record Associations
の修正です。
The has_many :through Association
の項の文中にhas_many association methods
へのリンクを追加、及びグラマーの修正を行っています。
use prepend instead of extending every instance
Active Supportのcache処理の修正です。
各cache storeクラスでStrategy::LocalCache
moduleを追加するのに、インスタンス生成時extend
を使用して行っていたのを、prepend
メソッドでクラスに追加するよう修正しています。
Avoids mutating the original response in connection management middleware
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
の修正です。
ActiveRecord::ConnectionManagement#call
メソッドでresponseを返す際、元のresponseを変化させていたのを止めて、新規にresponseを生成し値を返すよう修正しています。
元の実装だとメモリリークになってしまう恐れがあるのと、元のresponseがfreezeされた値だった場合にエラーになってしまう為、修正したとの事です。
Suppress warning (warning about assigned but unused variable)
activerecord/test/cases/connection_management_test.rb
の修正です。
元のresponseが変更されない事を確認するテストから、使用していない変数(response_body
)を削除しています。
Fix wrong assert_equal
argument order.
activerecord/test/cases/connection_management_test.rb
の修正です。
assert_equal
メソッドの引数の順番が間違っている(expected, actualの順番が正しい順番だが、逆だった)箇所があったのを修正しています。
Add comma to to make the information clear
rails guideのForm Helpers
の修正です。
Dealing with Ajax
の項、最初の説明の中にカンマを追加しています。
Parameterize with options to preserve case of string
activesupport/lib/active_support/core_ext/string/inflections.rb
、
activesupport/lib/active_support/inflector/transliterate.rb
の修正です。
String#parameterize
、ActiveSupport::Inflector#parameterize
メソッドの引数にキーワード引数を使用するよう修正、及び、大文字小文字の変換を行わないよう設定する為のpreserve_case
オプションを追加しています。
"Donald E. Knuth".parameterize(preserve_case: true) # => "Donald-E-Knuth" "Donald E. Knuth".parameterize # => "donald-e-knuth"
また、今後separatorの指定はseparator
オプションを使用する必要があります。
"Donald E. Knuth".parameterize('_') # => DEPRECATION WARNING: Passing the separator argument as a positional parameter is deprecated and will soon be removed. Use `separator: '_'` instead. (called from __pry__ at (pry):9) # => "donald_e_knuth" "Donald E. Knuth".parameterize(separator: '_') # => => "donald_e_knuth"
remove deprecated :tokenizer
option from guide [ci skip]
rails guideのActive Record Validations
の修正です。
length
helperについて説明している箇所から、deprecatedになった:tokenizer
オプションについての説明を削除しています。
Merge pull request #22145 from atul-shimpi/master
rails guideのActive Record Migrations
の修正です。
Column Modifiers
の項から、required
オプションについての説明を削除しています。
Require belongs_to
by default. by simi · Pull Request #18937 · rails/rails でrequired
オプションはデフォルトtrueになり、オプションを使用する必要が無くなった為。