なるようになるブログ

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

rails commit log流し読み(2015/07/06)

2015/07/06分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

actionmailer/CHANGELOG.md

actionpack/CHANGELOG.md


Refactor cookie_jar to decouple it from request object

actionpack/lib/action_dispatch/middleware/cookies.rbの修正です。

CookieJar.buildの引数をrequestクラスを削除しています。

CookieJarの生成処理とrequestクラスを分離し、テストの際に不要なインスタンスを生成しないようにする為の改善対応の為との事です。


Merge pull request #20748 from robin850/reserved-names

各generatorの修正です。

アプリ名に、予約語に登録された値が指定された時に表示するエラーメッセージの予約語の表示を、カンマ区切りにして表示するよう改善しています。


ActionMailer::MessageDelivery respects current I18n.locale

ActionMailerの修正です。

deliver_laterメソッドでメールを送信する際、現在のlocaleがActionMailer::DeliveryJob渡されていなかったのを、渡すよう修正しています。

I18n.locale = 'de'
mail.deliver_now # 正しくドイツ語のメールが生成される

I18n.locale = 'de'
mail.deliver_later # 英語のメールが生成されてしまう

Merge pull request #20767 from y-yagi/remove_unnecessary_fixture_method

railties/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rbの修正です。

plugin生成時に作成されるnavigation_test.rbから不要なfixtureの読み込み処理を削除しています。

Add fix for loading fixtures in engine teststest_helper.rbでfixtureを読み込むようになり、テストファイル個別にfixture読み込む必要は無くなった為、削除しています。


Add to RDoc of OrderedOptions the bang info

activesupport/lib/active_support/ordered_options.rbのdocの修正です。

OrderedOptionsクラスのbang付きメソッドについてのdocを追加しています。

h = ActiveSupport::OrderedOptions.new
h.boy = 'John'
h.dog  # => nil
h.dog! # => raises KeyError

Add to Security guides the secrets.yml

rails guideのRuby on Rails Security Guideの修正です。

Custom secretsの項を追加し、secrets.ymlについての説明を追加しています。


Merge pull request #13897 from gmalette/nested-parameter-filtering-2

actionpack/lib/action_dispatch/http/parameter_filter.rbの修正です。

親のkeyをベースにしたparametersのfilterを出来るよう対応しています。

config.filter_parameters += [ "credit_card.code" ]

{credit_card: {code: "xxxx"}}  #=> filterされる
{file: {code: "xxxx"}}        #=> filterされない