rails 7.0.1
Active Support
-
Fix
Class#descendantsandDescendantsTracker#descendantscompatibility with Ruby 3.1.The native
Class#descendantswas reverted prior to Ruby 3.1 release, butClass#subclasseswas kept, breaking the feature detection.Jean Boussier
Active Model
- No changes.
Active Record
-
Change
QueryMethods#in_order_ofto drop records not listed in values.in_order_ofnow filters down to the values provided, to match the behavior of theEnumerableversion.Kevin Newton
-
Allow named expression indexes to be revertible.
Previously, the following code would raise an error in a reversible migration executed while rolling back, due to the index name not being used in the index removal.
add_index(:settings, "(data->'property')", using: :gin, name: :index_settings_data_property)Fixes #43331.
Oliver Günther
-
Better error messages when association name is invalid in the argument of
ActiveRecord::QueryMethods::WhereChain#missing.ykpythemind
-
Fix ordered migrations for single db in multi db environment.
Himanshu
-
Extract
on update CURRENT_TIMESTAMPfor mysql2 adapter.Kazuhiro Masuda
-
Fix incorrect argument in PostgreSQL structure dump tasks.
Updating the
--no-commentargument added in Rails 7 to the correct--no-commentsargument.Alex Dent
-
Fix schema dumping column default SQL values for sqlite3.
fatkodima
-
Correctly parse complex check constraint expressions for PostgreSQL.
fatkodima
-
Fix
timestamptzattributes on PostgreSQL handle blank inputs.Alex Ghiculescu
-
Fix migration compatibility to create SQLite references/belongs_to column as integer when migration version is 6.0.
Reference/belongs_to in migrations with version 6.0 were creating columns as bigint instead of integer for the SQLite Adapter.
Marcelo Lauxen
-
Fix joining through a polymorphic association.
Alexandre Ruban
-
Fix
QueryMethods#in_order_ofto handle empty order list.Post.in_order_of(:id, []).to_aAlso more explicitly set the column as secondary order, so that any other value is still ordered.
Jean Boussier
-
Fix
rails dbconsolefor 3-tier config.Eileen M. Uchitelle
-
Fix quoting of column aliases generated by calculation methods.
Since the alias is derived from the table name, we can't assume the result is a valid identifier.
class Test < ActiveRecord::Base self.table_name = '1abc' end Test.group(:id).count # syntax error at or near "1" (ActiveRecord::StatementInvalid) # LINE 1: SELECT COUNT(*) AS count_all, "1abc"."id" AS 1abc_id FROM "1...Jean Boussier
Action View
-
Fix
button_toto work with a hash parameter as URL.MingyuanQin
-
Fix
link_towith a model passed as an argument twice.Alex Ghiculescu
Action Pack
-
Fix
ActionController::Parametersmethods to keep the original logger context when creating a new copy of the original object.Yutaka Kamei
Active Job
-
Allow testing
discard_on/retry_on ActiveJob::DeserializationErrorPreviously in
perform_enqueued_jobs,deserialize_arguments_if_neededwas called before callingperform_now. When a record no longer exists and is serialized using GlobalID this led to raising anActiveJob::DeserializationErrorbefore reachingperform_nowcall. This behaviour makes difficult testing the jobdiscard_on/retry_onlogic.Now
deserialize_arguments_if_neededcall is postponed to whenperform_nowis called.Example:
class UpdateUserJob < ActiveJob::Base discard_on ActiveJob::DeserializationError def perform(user) # ... end end # In the test User.destroy_all assert_nothing_raised do perform_enqueued_jobs only: UpdateUserJob endJacopo Beschi
Action Mailer
-
Keep configuration of
smtp_settingsconsistent between 6.1 and 7.0.André Luis Leal Cardoso Junior
Action Cable
- No changes.
Active Storage
- No changes.
Action Mailbox
- No changes.
Action Text
- No changes.
Railties
-
Prevent duplicate entries in plugin Gemfile.
Jonathan Hefner
-
Fix asset pipeline errors for plugin dummy apps.
Jonathan Hefner
-
Fix generated route revocation.
Jonathan Hefner
-
Addresses an issue in which Sidekiq jobs could not reload certain namespaces.
See fxn/zeitwerk#198 for details.
Xavier Noria
-
Fix plugin generator to a plugin that pass all the tests.
Rafael Mendonça França