2023/09/06分のコミットです。
CHANGELOGへの追加はありませんでした。
[skip ci] Document tuple support in Active Record where clauses
activerecord/lib/active_record/relation/query_methods.rb
のdocの修正です。
ActiveRecord::QueryMethods#where
メソッドのdocに、Introduce query-by-tuple syntaxで追加されたtuple syntaxを舌用した場合のexampleを追加ししています。
[skip ci] Add composite primary key examples to Rails guides
rails guideの修正です。
controllerやformでcomposite primary keyを使用しているmodelを扱う場合の説明を追加しています。
Infer primary_key: :id on associations with composite primary key models
activerecord/lib/active_record/autosave_association.rb
、
activerecord/lib/active_record/reflection.rb
の修正です。
composite primary keyを使用しているmodelでassociationを定義する際、必ずprimary_key
、または、query_constraints
オプションを指定する必要があったのを、composite primary keyにid
が含まれている場合、自動でprimary_key
を推測出来るよう修正しています。これにより、
class Order self.primary_key = [:shop_id, :id] has_many :order_agreements, primary_key :id end class OrderAgreement belongs_to :order, primary_key: :id end
と記載する必要があったのをが、
class Order self.primary_key = [:shop_id, :id] has_many :order_agreements end class OrderAgreement belongs_to :order end
のように、primary_key
オプションを省略出来るようになっています。
Revert "Lock globalid gem version to address broken CI"
globalid gemのバージョンをロックした、Lock globalid gem version to address broken CIをRevertしています。元々あった問題が解消された新しいバージョンのglobalidがリリースされた為。
Document clean chain behavior for ActiveRecord scope
rails guideのActive Record Query Interface
の修正です。
scopeをchainした場合の挙動について説明した、New Chains Inside Scope Block
を追加してます。
[ci skip] Document query_constraints
option in associations
activerecord/lib/active_record/associations.rb
のdocの修正です。
associationのドキュメントにquery_constraints
オプションについての説明を追加しています。
Merge pull request #49145 from javierav/feature/assets-config
railties/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt
の修正です。
asset pipeline libraryにPropshaftを使用している場合に、Sprockets用の設定を生成しないよう修正しています。
Instruct contributors to use 'ci skip' when submitting doc changes
rails guideのContributing to Ruby on Rails
の修正です。
Contributing to the Rails Documentation
の項に、docの変更の場合、PRタイトルに[ci skip]
を指定してほしい旨説明を追加しています。
Load ambient fixtures for ActiveRecordMessagePackTest
activerecord/test/cases/message_pack_test.rb
の修正です。
テスト内で使用しているfixtureのロードが不足していたのを修正しています。
Remove unused fixtures in *ConnectionTest
activerecord/test/cases/adapters/abstract_mysql_adapter/connection_test.rb
、
activerecord/test/cases/adapters/postgresql/connection_test.rb
の修正です。
使用していないfixtureを削除しています。
Merge pull request #49118 from akhilgkrishnan/generate-token-for-release-note
rails guideのRuby on Rails 7.1 Release Notes
の修正です。
ActiveRecord::Base.generates_token_for
メソッドについての詳細な説明を追加しています。
Merge pull request #49152 from yahonda/bigdecimal_314_or_higher_will_be_installed
activerecord/test/cases/validations/numericality_validation_test.rb
の修正です。
NumericalityValidationTest
で古いBigDecimal向けのテストがあったのを削除しています。Active Supportの依存上、現在Railsと一緒に使われることは無いバージョンの為。
Fix indentation in 7.1 release notes
rails guideのRuby on Rails 7.1 Release Notes
の修正です。
ActiveRecord::Base.generates_token_for
メソッドのexampleコードのインデントを修正しています。
[skip ci] ActiveSupport deprecate changes added to 7.1 release note (#49119)
rails guideのRuby on Rails 7.1 Release Notes
の修正です。
Active SupportのDeprecations
の項にdeprecatedになったメソッドの説明を追加しています。
Remove "proc to update web drivers." [ci-skip]
actionpack/lib/action_dispatch/system_testing/browser.rb
のdocの修正です。
Omit webdrivers gem from Gemfile templateの修正でActionDispatch::SystemTesting::Browser#preload
メソッドのdocを修正した際に、文を中途半端に削除してしまっていたのを、中途半端に残ってしまっていた説明部分を削除しています。
Bump github actions/checkout to v4
GitHub Actionsの修正です。
actions/checkout
のバージョンをv4に更新しています。