2023/08/22分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activejob/CHANGELOG.md
Add
ActiveRecord::Base#id_valuealias to access the raw value of a record's id column.Fix change_column setting datetime precision for 6.1 Migrations
- Fix
HostAuthorizationpotentially displaying the value of the X_FORWARDED_HOST header when the HTTP_HOST header is being blocked. - Add support for Playwright as a driver for system tests.
Initialize @has_query_constraints to false in the inherited hook
activerecord/lib/active_record/persistence.rbの修正です。
@has_query_constraintsの初期化処理をinherited hook内で行うよう修正しています。@has_query_constraintsを使用しているhas_query_constraints?メソッドはclass methodの為、init_internalsだと正しく値が設定出来ない為。
Create draft of 7.1 release notes
rails guideのRuby on Rails 7.1 Release Notesの修正です。
Major Featuresの項に各major featureの説明及び対応したPRのリンクを追加しています。
Add more async queries support to release notes
rails guideのRuby on Rails 7.1 Release Notesの修正です。
Major Featuresの項にasync queries supportの説明を追加しています。
Fix defect where aliased attribute methods on abstract classes were being not defined
activerecord/lib/active_record/attribute_methods.rbの修正です。
親クラスがActiveRecord::Baseでない子クラスで、親クラスで定義したalias attribute methodsが参照出来なくなってしまってたいのを修正しています。
activejob/lib/active_job/exceptions.rb、
activejob/lib/active_job/execution.rbの修正です。
jobがdiscardされた際に実行する処理を定義するためのafter_discardメソッドを追加しています。
class AfterDiscardJob < ActiveJob::Base after_discard do |job, exception| Rails.logger.info("#{job.class} raised an exception: #{exception}") end def perform raise StandardError end end
Remove Brakeman from security guide
rails guideのSecuring Rails Applicationsの修正です。
Brakemanについての説明を削除しています。guideでは外部のライブラリを推奨しないようにしている為。
Use alias_attribute to provide #id_value alias for #id
activerecord/lib/active_record/model_schema.rbの修正です。
primary keyでない:id columnのraw valueを取得するためのActiveRecord::Base#id_valueメソッドを追加しています。composite primary keyを使用しているmodelだと左記のようなmodelが存在しており、それらのmodelで使う想定との事です。
Merge pull request #48941 from skipkayhil/hm-show-correct-blocked-hosts
Action Packの修正です。
HostAuthorization middlewareでHTTP_HOST headerの値に指定されたhostが原因でblockされた場合に、エラーメッセージにはHTTP_X_FORWARDED_HOST headerの値だけが表示されていたのを、関連するhostの情報を全て表示するよう修正しています。
Merge pull request #44981 from tan-linx/improvement/how-to-use-remote-selenium-configuration
rails guideのTesting Rails Applicationsの修正です。
Changing the Default Settingsの項にある、system testでremote browserを使用する場合のexampleで、オプションの指定が不足していたのを修正しています。
Simplify the logic in the documentation.
rails guideのTesting Rails Applicationsの修正です。
Changing the Default Settingsの項にある、system testでremote browserを使用する場合のexampleのリファクタリングを行っています。
Merge pull request #47505 from julianfssen/update-api-link-to-button-to-turbo
actionview/lib/action_view/helpers/url_helper.rbのdocの修正です。
link_toメソッドのdocにdata-turbo-methodとdata-turbo-confirmについての説明を追加しています。
actionpack/lib/action_dispatch/system_testing/driver.rbの修正です。
system testで使用出来るdriverにPlaywrightを追加しています。
Add strict loals and Rails.application.deprecators to 7.1 release notes
rails guideのRuby on Rails 7.1 Release Notesの修正です。
Major Featuresの項にstrict localsとRails.application.deprecatorsの説明を追加しています。
Fix 6.1 change_column setting datetime precision
activerecord/lib/active_record/migration/compatibility.rbの修正です。
Rails 6.1で作成されたchange_columnを実行するmigirationで、datetime型のprecisionが正しく設定されないバグがあったのを修正しています。
Add an option to start rails console in sandbox mode by default
railtiesの修正です。
rails consoleをdefaultでsandbox modeで起動するかどうかをconfigで指定出来るよう修正しています。config.sandbox_by_defaultにtrueが指定されている、かつ、envがdevelopment、test以外の場合、デフォルトでsandbox modeで起動するようになっています。sanboxをoffにしたい場合、rails consoleに--no-sandboxオプションを指定すれば良いようになっています。
Refactor actions to make fewer status checks
GitHub workflowの修正です。
不要なstatus checkを行わないようリファクタリングしています。