2017/11/06分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Add same method signature for
Time#prev_year
andTime#next_year
in accordance withDate#prev_year
,Date#next_year
. - Add same method signature for
Time#prev_month
andTime#next_month
in accordance withDate#prev_month
,Date#next_month
. - Add same method signature for
Time#prev_day
andTime#next_day
in 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
を呼び出して必ず小文字にしてから取得するように対応しています。