2023/08/22分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activejob/CHANGELOG.md
Add
ActiveRecord::Base#id_value
alias to access the raw value of a record's id column.Fix change_column setting datetime precision for 6.1 Migrations
- Fix
HostAuthorization
potentially 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を行わないようリファクタリングしています。