2018/06/28分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activemodel/CHANGELOG.md
Merge pull request #33217 from eugeneius/test_duration_preserve_parts
activesupport/test/core_ext/duration_test.rb
の修正です。
Durationの乗算、除算についてのテストを追加しています。
Fix ActionMailer assert_enqueued_email_with
activejob/lib/active_job/test_helper.rb
の修正です。
assert_enqueued_with
メソッドでblockが指定された時だけyield
を実行するよう修正しています。
assert_enqueued_with
メソッドはassert_enqueued_email_with
から呼ばれるのですが、assert_enqueued_email_with
メソッドはblockを指定しないでも動作する旨docにて記載されていました。
しかし実際はassert_enqueued_with
のyield実行時エラーになってしまっていたので、docの説明の通り、assert_enqueued_email_with
にblockを指定しなかった場合にも動作するよう、修正を行っています。
が、これはdocが誤りで、blockは必ず指定する必要がある(blockの指定が無いと、assertionが必ず失敗する)為、後ほどrevertされています。
Break guides menu 'Digging Deeper' section in two
guides/source/documents.yaml
の修正です。
Digging Deeper
セクション配下にあったコンテンツのうち、コンポーネントに関するコンテンツを新規に追加したOther Components
セクション配下に移動しています。
Merge pull request #26764 from choncou/improve_has_secure_password
activemodel/lib/active_model/secure_password.rb
の修正です。
has_secure_password
メソッドが定義するattribute名をオプションで指定出来るよう修正しています。
class User < ActiveRecord::Base has_secure_password :activation_token, validations: false end user = User.new user.activation_token = "a_new_token" user.activation_token_digest # => "$2a$10$0Budk0Fi/k2CDm2PEwa3Be..." user.authenticate_activation_token("a_new_token") # => user
Improve wording for form_with in Getting Started Guide
rails guideのGetting Started with Rails
の修正です。
Updating Articles
の項、form_with
について説明している箇所の言い回しを修正しています。
Revert "Merge pull request #33243 from evopark/fix/action-mailer-test-helper-no-block"
assert_enqueued_with
メソッドでblockが指定された時だけyield
を実行するよう修正した、Fix ActionMailer assert_enqueued_email_withをrevertしています。理由は上記参照。