なるようになるブログ

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

rails commit log流し読み(2017/09/21)

2017/09/21分のコミットです。

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

activesupport/CHANGELOG.md

activerecord/CHANGELOG.md


Merge pull request #30616 from yhirano55/update_layouts_and_rendering

rails guideのLayouts and Rendering in Railsの修正です。

Rendering by Default: Convention Over Configuration in Actionの項にあるindex.html.erbのexampleがscaffoldで生成されるindex.html.erbと微妙に内容が異なっていたのを、同じ内容になるよう修正しています。


Merge pull request #30629 from yhirano55/add_scope_to_has_one_attached_macro

activestorage/lib/active_storage/attached/macros.rbの修正です。

ActiveStorage::Attached::Macros moduleにblobをeager loadする為のscope(scope :"with_attached_#{name}")を追加しています。


Merge pull request #30624 from bogdanvlviv/deprecate_Module_reachable

Active Supportの修正です。

Module#reachable?メソッドをdeprecateにしています。rails内部でもう使用してない為deprecateにしたとの事です。


Flesh out ActiveStorage::Filename docs

activestorage/app/models/active_storage/filename.rbのdocの修正です。

ActiveStorage::Filenameクラス及びクラス配下の各メソッドにdocを追加しています。


Add missing word [ci skip]

activestorage/app/models/active_storage/filename.rbのdocの修正です。

ActiveStorage::Filenameクラスのdocのグラマーの修正を行っています。


Update Rails Guides about :autosave option

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

:autosaveオプションについて説明している箇所に、:autosaveにfalseを指定した場合の挙動についての説明を追加しています。


Update payload names for sql.active_record to be more descriptive.

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

sql.active_record instrumentationのpayload nameに詳細な情報を出力するよう修正しています。

元々はSQLとしか表示されていなかったのですが、処理を行ったclass名 + 行った処理(CreateUpdateUpdate All等)を出力するようになっています。


Update link in The Asset Pipeline guide [ci skip]

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

Optimize cachingの説明へのリンクを修正しています。


Fix “warning: `*‘ interpreted as argument prefix”

activerecord/test/cases/instrumentation_test.rbの修正です。

instrumentationのテストでRubyのwarning(warning:*‘ interpreted as argument prefix`)が出ていたのを修正しています。


Use algorithm while removing index with db:rollback

activerecord/lib/active_record/migration/command_recorder.rbの修正です。

migrationのchangeメソッドでindex生成処理にalgorithmを指定した場合(e.g. add_index(:products, :name, algorithm: :concurrently))に、rollback処理でその指定したalgorithmが使用されないバグがあったのを修正しています。