What’s new in the latest major version
See https://rubyonrails.org/2021/12/15/Rails-7-fulfilling-a-vision
---
Ruby
- 648783 | Rails 7 requires Ruby 2.7 and prefer Ruby 3+
- #42053 | Replace map + compact with filter_map
- #40914 | Depend on ruby/debug, replacing Byebug
Active Support
- #40914 | Add Enumerable#sole
- #41333 | Add Enumerable#maximum
Active Model
- #41022 | Add validate numericality in range
- #40095 | Add ComparisonValidator to validate comparison of any objects
Active Storage
- #42425 | Add audio analyzer to active storage
- #42410 | Add support for ActiveStorage expiring URLs
Action View
- #42234 | Let link_to infer link name from Model#to_s
- #41143 | Support phone_to options when name not specified
- #40914 | Support sms_to options when name not specified
Active Record
- #41659 | Add encryption to Active Record
- #41372 | Implement Relation#load_async to schedule the query on the background thread pool
- #41439 | Add #excluding to ActiveRecord::Relation
- #40249 | Expose an invert_where method that will invert all scope conditions
Railties
- #42997 | Remove spring as a default installation option
- #42985 | Stop trying to configure listen by default on compatible platforms
- #43172 | Use the combined jsbundling-rails gem instead of individual js bundler gems
- #43110 | Remove default reliance on Sass and CSS generators
- #43177 | Add --css app generator option
- #42999 | Replace Webpacker with importmapped Hotwire as default JavaScript setup
Other relevant PRs
- 0d523d | Drops support for classic mode (Zeitweirk only)
- #42240 | Add Marginalia to Rails, via QueryLogs
- #43261 | Make Sprockets more optional, offer Propshaft as alternative
- #39135 | Make Sprockets more optional, offer Propshaft as alternative
- #39135 | Add ability to use pre-defined Active Storage variants
- #43112 | Document that @rails/ujs is deprecated
- #41856 | Add support for generated columns in PostgreSQL
- #42245 | Support NullsFirst for all databases
- #39723 | Create database via UI when ActiveRecord::NoDatabaseError
- #40708 | Change form_with to generate non-remote forms by default
- #41083 | Avoid suggesting very unlikely changes in rails app:update
- #42538 | Generate less initializers in new/upgraded Rails apps