2017/11/06分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Add same method signature for
Time#prev_yearandTime#next_yearin accordance withDate#prev_year,Date#next_year. - Add same method signature for
Time#prev_monthandTime#next_monthin accordance withDate#prev_month,Date#next_month. - Add same method signature for
Time#prev_dayandTime#next_dayin accordance withDate#prev_day,Date#next_day. - Fix acronym support in
humanize
Ensure apply_join_dependency for collection_cache_key if eager-loading is needed
Active Recordの修正です。
ActiveRecord::CollectionCacheKey#collection_cache_keyメソッドで、eager loadを使用している場合、apply_join_dependencyメソッドを呼び出すよう修正しています。
eager loadしている場合にcollection cache keyを正しく生成出来るようにする為。
Ensure apply_join_dependency for update_all and delete_all if eager-loading is needed
activerecord/lib/active_record/relation.rbの修正です。
update_all、delete_allメソッドでeager loadを使用している場合に、apply_join_dependencyメソッドを呼び出すよう修正しています。
eager loadしている場合に正しいSQLを生成出来るようにする為。
Fix preloading polymorphic association when through association has already loaded
activerecord/lib/active_record/associations/preloader/through_association.rbの修正です。
has_many + through + polymorphicなassociationをpreloadを行う、かつ、既にthrough先のassociationがload済みだった場合に、source_typeが無視されてしまうバグがあったのを修正しています。
Fix preloading polymorphic multi-level through association
activerecord/lib/active_record/associations/preloader/through_association.rbの修正です。
polymorphic + multi-levelのthrough associationをpreloadした際に、preloadが正しく行われないバグがあったのを修正しています。
scoping should respect current class and STI constraint (#29199)
activerecord/lib/active_record/scoping/named.rbの修正です。
Scoping::Named::ClassMethods#allメソッドでscopeを取得する際に、selfとcurrent scopeのclassが異なる場合に、relationを再作成するよう修正しています。
STIを使用している場合等で、selfとcurrent scopeのclassが異なる場合があり、そのような場合に正しい値を取得出来るようにする為、のようです。
Explicitly pass window handle to resize_window_to
actionpack/lib/action_dispatch/system_testing/driver.rbの修正です。
SystemTesting::Driver#register_webkitメソッドでresize_window_toメソッドを呼び出す際に引数が不足していたのを修正しています。
railties/lib/rails/generators/named_base.rbの修正です。
使用していないactive_support/core_ext/module/introspectionのrequireを削除しています。
Merge pull request #30620 from bogdanvlviv/method_signature_prev-next-day-month-year_for_time
activesupport/lib/active_support/core_ext/date_and_time/calculations.rbの修正です。
Timeクラスのprev_year、next_year、prev_month、next_month、prev_day、next_dayに引数(それぞれ年数、月数、日数)を渡せるよう修正しています。Dateクラスの各メソッドと同じ挙動です。
Merge pull request #31066 from Leyka/patch-1
activesupport/lib/active_support/inflector/transliterate.rbのdocの修正です。
parameterizeメソッドのdoc内のexampleコードのtrésをtrèsに修正しています。
trèsの方が正しい為とのことです。
Fix acronym support in humanize
activesupport/lib/active_support/inflector/methods.rbの修正です。
humanizeメソッドでacronymに指定した設定が正しく使用されないバグがあったのを修正しています。
issueより。
ActiveSupport::Inflector.inflections do |inflect| inflect.acronym "LAX" inflect.acronym "SFO" end
# Before "LAX ROUNDTRIP TO SFO".humanize # => "Lax roundtrip to sfo" # After "LAX ROUNDTRIP TO SFO".humanize # => "LAX roundtrip to SFO"
acronym inflectionsは小文字のkeyで管理されている為、大文字でkeyが指定された場合に正しくヒットしませんでした。値を取得する際にdowncaseを呼び出して必ず小文字にしてから取得するように対応しています。