Rails 8 adds Brakeman by default to new applicationsAll new applications using Rails 8 will have Brakeman gem by default for static analysis for security vulnerabilities.
Rails 7.1 Allows ActiveRecord::Relation#explain To Accept OptionsAdding analyze and verbose as ActiveRecord::Relation#explain options give us deeper insight into query performance.
Rails 7.1 Introduces ActiveRecord regroup MethodWith regroup and regroup! methods we can override the group_values
Rails 7.1 allows resetting singular associationsQuery database again to retrieve the associated record by resetting the cache on singular associations.
Rails introduces ErrorReporter#unexpected for reporting precondition violationsThe new method will report in production but raise in other environments, making it easier to debug.
Rails 7.1 Introduces Option To Disable All Methods That ActiveRecord.enum GeneratesDisable auto generated methods of ActiveRecord.enum with instance_methods by passing false to it.
Upsert no longer ignores on_duplicate if unique_by is specifiedUpsert would previously not execute the on_duplicate clause if the unique_by constraint found a match. This has been fixed.
ActiveStorage now pre-processes PDFs and videosRails now pre-processes previewable files such as PDFs and videos. Previously it only pre-processed images.
Rails 7.1 Adds path_params Option For url_for Helper Methodpath_params allows specified params to be used exclusively for named segments under scoped routing without unnecessarily appending parameters to every URL.
Rails 7.1 Introduced Validate Option For EnumsRails 7.1 added a validate option for enums, which will allow developers to validate the passed enum values before saving it.