なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2019/03/02)

2019/03/02分のコミットです。

CHANGELOGへの追加はありませんでした。


Use the correct model in the test

activerecord/test/models/post.rbの修正です。

Post modelのauthor_favorites_with_scope associationで使用するクラスに誤りがあった(scopeの指定が無いクラスを使用していた)のを修正しています。


Merge pull request #35429 from jhawthorn/template_format_nil

Action View、Acton Mailerの修正です。

No nil format on templatesActionView::Templateformatの指定が必須になったのですが、それはやめにして、ActionView::Templateformatnil(無指定)を許容するよう修正しています。

formatが指定されていない場合、元の挙動と同様にdetailsからformatを取得するようになっています。ただ、元の実装と異なり、その取得したformatをtemplateには設定しないようにしています。そのため、templateがimmutableなのは変わらず。


Add test and change how format set in ActionMailer

Action Mailerの修正です。

Action Mailerでmultipart formatsが自動で設定される事を確認するテストを追加、及び、formatsを指定するのにself.formatsに依存していたのを、renderメソッドの引数に明示的にformatsを指定するよう修正しています。