なるようになるブログ

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

rails commit log流し読み(2018/10/23)

2018/10/23分のコミットです。

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

actionpack/CHANGELOG.md


[ci skip] Clarify load_paths behaviour

rails guideのRails Internationalization (I18n) APIの修正です。

Configure the I18n Moduleの項に、application経由でload_pathを設定する方法(config.i18n.load_path)とI18n.load_path経由で設定する方法の違いについての注記を追加しています。


[ci skip] Fix #33914

rails guideのActive Record Associationsの修正です。

warningが発生するbelongs_to + dependent: :destroyを使用しているexampleがあったのを修正しています。


Merge pull request #34222 from bogdanvlviv/unify-changelog-entries

railties/CHANGELOG.mdの修正です。

Refactor migrations_path command option to database--databaseオプションに変更になった、--migrations_pathsオプションに関するエントリーを、--databaseオプションを追加した対応のエントリーとマージしています。


Remove mentions about javascripts option from the guide about generators [ci skip]

rails guideのCreating and Customizing Rails Generators & Templatesの修正です。

config.generatorsのexampleから、使用出来ないjavascriptsオプションについての説明を削除しています。


Add docs to ActiveSupport::Notifications.subscribe

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

ActiveSupport::Notifications.subscribeメソッドにdocを追加しています。


Merge pull request #34289 from jschulenklopper/patch-1

railties/lib/rails/generators/rails/app/templates/gitignore.ttの修正です。

/storage/*について説明しているコメントの末尾にピリオドを追加しています。


Merge pull request #34261 from matildasmeds/guides_remove_upgrade_section_from_asset_pipeline_guide

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

Upgrading from Old Versions of Railsの項を削除しています。内容が古い(Rails 2.x -> 3.0についての話、及び、Rails 4系についての内容だった)為。


Merge pull request #34286 from rails/fix-csp-dynamic-sources

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

Content Security Policyの設定で、dynamic sources(e.g. policy.script_src -> { request.host })を使用していた場合に、routesでredirectを行うとエラーになってしまうバグがあったのを修正。及び、同じくdynamic sourcesを使用していて、dynamic sourcesの戻り値がSymbolの場合(e.g. policy.default_src -> { :self })に、不正なHTTPヘッダーが生成されてしまうバグがあったのを修正しています。


MySQL 8.0.13 raises ER_NO_REFERENCED_ROW and ER_ROW_IS_REFERENCED

activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rbの修正です。

InvalidForeignKeyにするerror numberの一覧に1216(ER_NO_REFERENCED_ROW)1217(ER_ROW_IS_REFERENCED))を追加しています。

親テーブルに対するtable-level privilegesが無い場合、ER_NO_REFERENCED_ROW、及び、ER_ROW_IS_REFERENCEDが使用されるようMySQL 8.0.13で変更された為。

参考:MySQL :: MySQL 8.0 Reference Manual :: B.3 Server Error Codes and Messages


Fix PullRequest link to datetime_field changes on Rails 5.1 Release Notes

rails guideのRuby on Rails 5.1 Release Notesの修正です。

datetime_fielddatetime_field_tagの挙動が変わった対応についてのPRのリンクが誤っていたのを修正しています。


Hide PG::Connection from API docs [ci skip]

activerecord/lib/active_record/connection_adapters/postgresql_adapter.rbのdocの修正です。

PG::Connection classがAPI docに表示されないようにする為に、:nodoc:の指定を追加しています。