2019/01/17分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Remove frozen_string_literal
from Action Cable's template files
actioncable/lib/rails/generators/test_unit/templates/channel_test.rb.tt
、
rails/railties/lib/rails/generators/rails/app/templates/test/channels/application_cable/connection_test.rb.tt
の修正です。
Action Cableのtemplateファイルからfrozen_string_literal
を削除しています。他のtemplateと合わせる為。
Fix document formatting on ActionMailbox [ci skip]
Action Mailboxのdocの修正です。
doc全体のフォーマットの修正を行っています。
Revert "Don't handle params option in a special way in url_for helper"
url_for
メソッドからparams
オプションについての処理を削除した、Merge pull request #33256 from ilkkao/ilkkao/remove-unused-params-optionをrevertしています。
:domain
のような特定のオプションを渡す為に必要な為、との事です。例えば、url_for(domain: 'foo.com')
だとfoo.com
が生成されるのですが、url_for(params: { domain: 'foo.com' })
だと?domain=foo.com
となる、という使い分けがある為。
railties/lib/rails/test_unit/testing.rake
の修正です。
channelのテストを実行する為のtest:channels
taskを追加しています。
Require hash/keys inside active_model/callbacks
activemodel/lib/active_model/callbacks.rb
の修正です。
不足していたactive_support/core_ext/hash/keys
のrequireを追加しています。
Merge pull request #34832 from gmcgibbon/db_system_change_command
railtiesの修正です。
databaseの設定を変更する為のdb:system:change
コマンドを追加しています。
最初sqlite3を使うようrails new
でアプリを作成したが、その後PostgreSQLやMySQLを使う事になった場合に使用する、databaseの設定変更用のコマンドです。
やっている事は、Gemfileへの必要なgemの追加と、config/database.ymlの変更処理です。
$ bin/rails db:system:change --to=postgresql conflict config/database.yml Overwrite /config/database.yml? (enter "h" for help) [Ynaqdhm] y force config/database.yml gsub Gemfile
Minimize boilerplate setup code for JavaScript libraries
JavaScript librariesを使用するコードのexampleがimport + startを別の行にやっていたのを、request + startで1行で行うよう修正しています。
例。
- import * as ActiveStorage from "@rails/activestorage" - ActiveStorage.start() + require("@rails/activestorage").start()
Merge pull request #34941 from rmacklin/allow-actioncable-to-run-in-web-workers
Action Cableの修正です。
console
やWebSocket
を使用するのにreceiverにwindow
を使用していたのを、self
を使用するよう修正、及び、addEventListener
やremoveEventListener
から明示的なreceiverの指定を削除しています。
web workerで使用出来るようにする為(web workerではwindow
やdocumentは使用出来ない)。
Add a space in framework names. Matches Active Record in generated Gemfile.
railties/lib/rails/generators/rails/app/templates/Gemfile.tt
の修正です。
コメントにあるコンポーネント名を正式名称(スペース入りの値)に修正しています。
Merge pull request #33419 from bogdanvlviv/update-active_storage
Active Storage、railtiesの修正です。
app:update
実行時にactive_storage_attachments
tableからactive_storage_blobs
に外部キー制約を貼る為のmigrationを生成するよう修正しています。
元々は外部キー制約は無くて、後から追加された([Add a foreign-key constraint to the active_storage_attachments table for blobs)で追加された)為。