なるようになるブログ

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

rails commit log流し読み(2017/03/17)

2017/03/17分のコミットです。

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


Add documentation to use with_options in the same class [ci skip]

activesupport/lib/active_support/core_ext/object/with_options.rbのdocの修正です。

Object#with_optionsメソッドのdocに、with_options内で同じクラスの値を使用する場合のexampleを追加しています。


Merge pull request #28444 from budnik/patch-2

actionpack/lib/action_dispatch/testing/integration.rbのdocの修正です。

Session#postメソッドのdocに、メソッドの戻り値がresponse objectである旨説明が記載されていたのですが、実際はstatus codeを返すようになっていたので、その旨ドキュメントを修正しています。


Merge pull request #28421 from tangposmarvin/docs-assest-pipeline

rails guideのThe Asset Pipelineの修正です。

Coding Links to Assetsの項、assetsを格納するディレクトリのパスに誤りがあったのを修正しています。


Cleanup documentation fixes (#28460)

actionpack/lib/action_dispatch/testing/integration.rbactivesupport/lib/active_support/core_ext/object/with_options.rbのdocの修正です。

ActionDispatch::Integration::Session#postメソッド、Object#with_optionsメソッドのdocのグラマーの修正を行っています。


Bump Capybara and include Minitest::Assertions

Gemfileactionpack/lib/action_dispatch/system_test_case.rbの修正です。

Capybaraのバージョンを2.13.0に更新、及び、ActionDispatch::SystemTestCaseクラスでCapybara::Minitest::Assertions moduleをincludeするよう修正しています。

Capybara + Minitestの組み合わせだとAssertionsが正しく表示されない、という問題があり、最新のCapybaraでその問題が対応された為、最新のCapybaraを使用するようバージョンを更新しています。

参考:Add parity between rspec support and minitest


Add :default option to belongs_to (#28453)

Active Recordの修正です。

belongs_toメソッドにデフォルト値を設定する為のdefaultオプションを追加しています。

belongs_to :account, default: -> { Current.account }