2020/10/31分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Rename the new
TagHelper#class_namesmethod toTagHelper#token_list, and make the original available as an alias. - Alias
ActionView::Helpers::Tags::Label::LabelBuilder#translationto#to_sso thatform.labelcalls can yield that value to their blocks. - Yield translated strings to calls of
ActionView::FormBuilder#buttonwhen a block is given.
actiontext/CHANGELOG.md
activejob/CHANGELOG.md
Set inverse during has one autosave if necessary
activerecord/lib/active_record/autosave_association.rbの修正です。
inverse_ofが指定されたhas_one associationで、autosave時に依存に保存されたインスタンスをロードするよう修正しています。
Sort results to fix nondeterministic test failures
activerecord/test/cases/relation/where_test.rbの修正です。
assertionで値を比較する際に、値をidでsortしてからチェックするよう修正しています。 sortを指定しないと結果が不定になる為。
Alias TagHelper#class_names to #token_list
actionview/lib/action_view/helpers/tag_helper.rbの修正です。
TagHelper#class_namesをTagHelper#token_listにリネームしています。
class以外にもスペース区切りのリストで表されるattributeがあり、それらはDOMではDOMTokenList(DOMTokenList - Web APIs | MDN)として扱われるので、token_listの方が適切な名前だろう、という事でリネームされています。aliasとしてclass_namesが定義されている為、class_namesも引き続き使用出来るようになっています。
Add ActionText::FixtureSet.attachment
Action Text、Active Recordの修正です。
YAML fixturesでAction Textのattachmentのelement(<action-text-attachment sgid="..."></action-text-attachment>)を生成する為のヘルパーメソッド(ActionText::FixtureSet.attachment)を追加しています。
Recover precision when serializing Time, TimeWithZone and DateTime.
Active Jobの修正です。
Time, TimeWithZone 及び DateTime objectsをserializeした際に、ナノ精度が失われてしまっていたのを、保持するよう修正しています。
Yield Tags::Label::LabelBuilder#translations
actionview/lib/action_view/helpers/tags/label.rbの修正です。
Tags::Label::LabelBuilder#translations#to_sメソッドでtranslationメソッドを実行するよう修正しています。
form.labelにblockを指定している場合に、labelのtranslation textをblock内で使用出来るようにする為。
Merge pull request #39828 from tgxworld/backward_patches_for_time_floor_ceil
activesupport/lib/active_support/core_ext/time/calculations.rbの修正です。
(メソッドが定義されていない場合のみ)Time#floorを、(Ruby 2.7.1以下の場合のみ)Time#ceilメソッドをそれぞれ定義するよう修正しています。
Ruby 2.7.1以下でTime#ceilの戻り値がおかしいというバグがあり、そのための対応。
参考: Bug #17025: `Time#ceil` does not work like `Rational#ceil` or `Float#ceil`
Remove deprecated config from the documentation
rails guideのConfiguring Rails Applicationsの修正です。
deprecatedになったconfigについての説明を削除しています。
Yield translation to FormBuilder#button block
actionview/lib/action_view/helpers/form_helper.rbの修正です。
ActionView::FormBuilder#buttonのblock引数にtranslated textを渡すよう修正しています。
actionview/test/template/form_helper/form_with_test.rbの修正です。
tag.spanの引数の指定方法に誤りがあったのを修正しています。
Merge pull request #39532 from vipulnsward/fix-tz-perform-now
activejob/lib/active_job/core.rbの修正です。
perform_nowでtimezonが保持されないバグがあったのを修正しています。
Fix warning in Rubies that already have the method
activesupport/lib/active_support/core_ext/time/calculations.rbの修正です。
Time#ceilを定義する前に、同名のメソッドを削除するよう修正しています。
Ruby 2.7.2 still have the same bug
activesupport/lib/active_support/core_ext/time/calculations.rbの修正です。
独自のTime#ceilメソッドを定義する条件をRuby 2.8以下に修正しています。Ruby 2.7.2でもまだバグが修正されていなかった為。
tools/test.rbの修正です。
bundlerのsetupが複数回実行されるようになってしまっていたのを修正しています。