Rails Latest Version: The changes introduced in Rails 7.0.4

Tags
6 October 2022
Complete Guide for CTO & IT Directors
Microservices under X-Ray Three books image Download free ebook

On the 9th of September 2022 the latest version of rails, 7.0.4, was released. It was released alongside rails versions 6.1.7, and 6.0.6, and delivered some bug fixes (only for the 7.0.4 version, as the 6.0.x and 6.1.x aren’t supported for further bug fixes), better compatibility, and improvement to the performance.

As a platform designed specifically for web application development, Rails is known for its convention over configuration approach. This means that Rails focuses on simplifying the development process by relying on a set of default conventions. This directly translates to quicker development because you don’t have to configure every and each aspect of an application manually. The built-in testing support also helps produce the applications faster and less buggy.

These features make Ruby on Rails ideal for prototyping, so any development team should consider building their product in Ruby on Rails.

However, like with everything else, there are disadvantages to Ruby on Rails. For one, Rails isn’t that fast. Being written as a framework for Ruby (an object-oriented scripting language) it falls behind other compiled programming languages. Moreover, Ruby on Rails might be quite difficult and costly to scale. As it wasn’t designed with large applications in mind, it will require a lot of additional work if you want to properly scale a large Ruby on Rails application.

What the Rails latest stable version has to offer for web developers

The current stable version of rails, 7.0.4, brought a number of changes which we will go through below.

Active Support

Two changes here. Redis cache store is now compatible with the Ruby client redis-rb in version 5.0. The second change is a fix to the behavior of NoMethodError on custom ActiveSupport::Deprecation. The arity restriction on custom behaviors is now removed.

Active Model

Fixed name clashes in attribute methods code generation cache. Before, when two different methods had generated similarnames the first implementation would be re-used.

Active Record

A lot of changes and fixes here.

Firstly, symbol is by default allowed for YAML columns. Moreover, a number of smaller fixes such as ActiveRecord::Store serializing as a regular Hash, fixed lead_async scheduling AND using the query, fixing eager loading for models devoid of primary keys, and Hstore deserialized regression.

PostgreSQL time zone away type timestaptz was also added and is required for correctly parsing some of the values in your database.

Additionally, an issue with a stale relation cache_cersion was also fixed. Before the latest version of rails, when reset was called on a relation object it didn’t correctly reset the cache_version ivar. This could lead to a situation in which a correct data still were reported as a stale cache_version.

Action View

Two changes here. First is a guard against ActionView::Helpers::FormTagHelper#field_name calls with nil object_name. The second is the correct tagging of html_safe? strings returned from strip_tags which helps in avoiding double-escaping entities. As these strings contain no HTML there are safe to be included as PCDATA in HTML content.

Action Pack

The existing values in Server-Timing cannot be now overwritten by ActionDispatch::ServerTiming.

Active Job

One change: the deprecation warning was removed from ActiveJob::QueueAdapters::QueAdapter.

Action Cable

Just like with the cashe mentioned in Active Support, the Redis adapter is now compatible with reddis-rb 5.0 version. Moreover, redis-rb 3.x compatibility was dropped.

You can now mount the Action Cable server with anchor: true. The routes that start with /cable won’t clash with Action Cable.

Active Storage

A single change that foxes proxy downloads for files over 5Mb as before trying to view and download larger files from services like S3 via proxy mode could result in returning corrupted files.

Railties

Some of the changes introduced to the core of the Rails framework are skipping Action Mailer and Active Storage in a case when the Active Job is skipped or checking if the framework is disabled while running app:update.

If you wish to read more about the latest versions of Ruby on Rails, please see the official documentation for the complete list of the changes in the latest release. Moreover, the Rails community can surely provide details about some of the new features.

Latest Posts

Scrum: How to Work Together

With the popularity of the scrum framework among software development teams, it’s growingly important to learn how a scrum team works to meet its goals. Scrum Process Overview Scrum is an agile project management framework widely used in IT but can be applied to other fields as well. The framework facilitates the management of complex […]

/
event storming

Event Storming: How to Boost Your Software Development Process with a Simple Technique?

Event storming is a dynamic workshop technique that supports domain-driven design in software development. It can boost the team’s efficiency and reduce error risk, minimizing the back-and-forth in the development lifecycle. If you haven’t been living under a rock, you’re probably familiar with the concept of brainstorming. It’s a widely used term for the process […]

/
rails vs sinatra

Rails vs Sinatra

In the rapidly evolving world of software development, web frameworks have become essential tools for building robust and scalable web applications. These frameworks provide a structured environment that streamlines the development process, offering pre-written code, libraries, and guidelines that help developers avoid repetitive coding tasks, thus significantly enhancing productivity and ensuring best practices. Within the […]

/
android webstockets

Introduction to Android WebSocket

WebSockets have become a pivotal technology in enabling real-time communication for Android apps, offering a dynamic way to send and receive messages instantaneously. This technology facilitates a persistent connection between the client (Android app) and the server, bypassing the traditional HTTP request-response model to allow continuous data flow through a single TCP connection. The WebSocket […]

/
smart contracts audit

Introduction to Smart Contract Audits

In the blockchain world, smart contracts are key to decentralized applications (dApps), automating transactions and enforcing agreements without intermediaries. These contracts handle significant digital assets and perform crucial operations, making their security paramount. Smart contract audits are thus essential, scrutinizing the contract’s code for vulnerabilities to prevent potential security breaches. These audits are crucial for […]

/
What is Python Used for in Finance

Embracing the Essence of Scrum: The Indispensable Values for Agile Teams

In the ever-evolving landscape of project management, Agile methodologies like Scrum have become the cornerstone for many teams striving for adaptability and efficiency. While Scrum offers a comprehensive framework and great agile tools, it is the underlying values that truly breathe life into the process. During The Sprint What Scrum Value Must The Team Demonstrate […]

/
Related posts

Scrum: How to Work Together

With the popularity of the scrum framework among software development teams, it’s growingly important to learn how a scrum team works to meet its goals. Scrum Process Overview Scrum is an agile project management framework widely used in IT but can be applied to other fields as well. The framework facilitates the management of complex […]

/
What is Python Used for in Finance

Embracing the Essence of Scrum: The Indispensable Values for Agile Teams

In the ever-evolving landscape of project management, Agile methodologies like Scrum have become the cornerstone for many teams striving for adaptability and efficiency. While Scrum offers a comprehensive framework and great agile tools, it is the underlying values that truly breathe life into the process. During The Sprint What Scrum Value Must The Team Demonstrate […]

/

Optimization Testing: The First Step towards Better Efficiency

In the ever-evolving landscape of software development, optimization testing emerges as a pivotal strategy, playing a crucial role in enhancing the efficiency and effectiveness of software projects. At its core, optimization testing is a process aimed at streamlining the testing phase of software development, ensuring that the functionality, reliability, and performance of software products are […]

/
web app speed

Revisiting Web App Speed

The performance of a web application can either encourage or deter user interest. Businesses should prioritize performance improvements to enhance the overall user experience and maintain user interest. Let’s delve into a mixture of development optimization, marketing, and… cognitive sciences? All for the sake of providing a smooth user experience. What Is Web Application Speed? […]

/
software development stages

Software Development Life Cycle. How to Handle a Multi-Stage Software Development Process?

Creating a system that performs complex functions requires more than rock-solid expertise. You need a structured approach that will help you achieve your software development goals as efficiently as possible. Software development is a long, complex, and tedious process ridden with challenges. Common issues include incomplete requirements, changing project scopes, poor communication, unrealistic deadlines, insufficient […]

/
angular apps

Angular Apps: Top 7 Web Application Examples, Advantages, and Considerations

Angular is a leading development tool for building sophisticated web apps. Check out the top applications fueled by this Google-backed platform and learn about its strengths and weaknesses. Angular is a household name in the front-end development industry and the key competitor of React (aka ReactJS). As one of the leading web development frameworks, it […]

/
Talk with experts

We look forward to hearing from you to start expanding your business together.

Email icon [email protected] Phone icon +1 (888) 413 3806