Rails 7.1 Introduces ActiveRecord regroup Method
With regroup and regroup! methods we can override the group_valuesMemo vs. useMemo: When to use each for better React performance?
Ever wondered when to use React.memo and useMemo? This in-depth guide clarifies their differences and shows how to leverage them for optimal performance.Rails 7.1 allows resetting singular associations
Query database again to retrieve the associated record by resetting the cache on singular associations.What is new in Ruby 3.3
Ruby 3.3 boasts performance boosts (faster YJIT, M:N threads), a pure-Ruby JIT compiler (RJIT), a new parser (Prism), developer-friendly features in IRB, and multiple bug fixes.Rails introduces ErrorReporter#unexpected for reporting precondition violations
The 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 Generates
Disable auto generated methods of ActiveRecord.enum with instance_methods by passing false to it.Upsert no longer ignores on_duplicate if unique_by is specified
Upsert would previously not execute the on_duplicate clause if the unique_by constraint found a match. This has been fixed.Performance Gains in Ruby 3.3- String.dup vs. String#+
Ruby 3.3 optimizes String.dup to match the speed of String#+, allowing developers to choose based on preference without sacrificing performance.ActiveStorage now pre-processes PDFs and videos
Rails now pre-processes previewable files such as PDFs and videos. Previously it only pre-processed images.Rubygems introduced a file option to specify Ruby version in Gemfile
Rubygems introduced a :file option so that we can read the Ruby version from a file.