Rails

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.

ActiveStorage now pre-processes PDFs and videos

Rails 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 Method

path_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 Enums

Rails 7.1 added a validate option for enums, which will allow developers to validate the passed enum values before saving it.

Rails 7.1 Allows ActiveRecord reselect Query Method To Accept Hash

Use of hash syntax for specifying columns and aliases with the ActiveRecord::QueryMethods#reselect method makes it easier for querying.

Optimizing System Performance by Implementing a Dual Database Setup in Rails

Implementing a Replica Database solution, the article highlights overcoming system strain with a dual DB approach, ensuring streamlined operations and improved performance efficiency

Rails 7.1 Introduces Default Dockerfiles

Dockerfiles facilitate the deployment of Rails applications in production environments using Docker.

Rails 7.1 Adds ActiveJob#perform_all_later To Enqueue Multiple Jobs At Once

perform_all_later allows us to enqueue multiple jobs that belong to different classes simultaneously within ActiveJob.