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
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 […]

/
ux writing samples

UX Writing Samples. How to Enhance Usability With Effective Microcopy?

Text is an integral part of UI design and user experience. High-quality, usability-focused copy helps engage users and turn them into customers. User experience (UX) writing is much more than a buzzword. It combines writing proficiency and inventiveness with a strong focus on user actions. The goal is to make things smooth, easy, and informative […]

/
gregg castano news direct

How to Pick a Good Software Partner? Q&A with Gregg Castano of News Direct  

A few years ago, we had the opportunity to work with News Direct on developing their platform. After carefully analyzing their needs, we’ve helped them design the system and developed a microservices-based architecture incorporating state-of-the-art modern technology allowing for communication using both synchronous and asynchronous calls to ensure high system flexibility and scalability. The main […]

/
cert pinning android

Mobile Development and Security: Certificate Pinning on Android

In today’s increasingly interconnected digital world, the importance of security for mobile apps and web services cannot be overstated. As cyber threats evolve, so must the defenses and measures we deploy to safeguard sensitive data and maintain trust. One of the pivotal practices in enhancing network security is certificate pinning, a technique that ensures a […]

/
django apps

Django Apps, Projects, and Other Caveats

Django, emerging as a significant player in the realm of web frameworks, stands out as a Python-based toolset that revolutionizes the way developers approach web application development. It is not merely a framework but a holistic environment that encapsulates a developer’s needs for building robust, efficient, and scalable web applications. Born out of a practical […]

/
rxjs react

RxJs & React: Reactive State Management

In the ever-evolving realm of web development, the quest for efficient, scalable, and maintainable tools never ends. Two such tools, React and RxJS, have garnered significant attention in the recent past. React, the brainchild of Facebook focuses on crafting intuitive user interfaces by leveraging a component-based architecture. On the other hand, RxJS offers a fresh […]

/
Related posts
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 […]

/
cert pinning android

Mobile Development and Security: Certificate Pinning on Android

In today’s increasingly interconnected digital world, the importance of security for mobile apps and web services cannot be overstated. As cyber threats evolve, so must the defenses and measures we deploy to safeguard sensitive data and maintain trust. One of the pivotal practices in enhancing network security is certificate pinning, a technique that ensures a […]

/
django apps

Django Apps, Projects, and Other Caveats

Django, emerging as a significant player in the realm of web frameworks, stands out as a Python-based toolset that revolutionizes the way developers approach web application development. It is not merely a framework but a holistic environment that encapsulates a developer’s needs for building robust, efficient, and scalable web applications. Born out of a practical […]

/
Angular mobile apps

Angular Mobile Apps: Key Advantages and Considerations

Angular is a popular framework backed by a huge community, favored by many developers, and used by leading corporations, including Google, Microsoft, and Samsung. Find out how it can streamline mobile app development. In software development, efficiency is paramount. Building maintainable and scalable applications requires a lot of proficiency and experience, which enable you to […]

/
platform native

Platform-native vs. cross-platform vs. hybrid development. How to develop an app?

Creating a flawless mobile app is a challenge in many ways. For starters, you need to choose the right approach. We explain how to decide between native, hybrid, and cross-platform mobile app development. Developing an app can take anything from a few to over ten months, depending on the project’s complexity and the development team’s […]

/
prototype vs proof of concept

Prototype vs Proof of Concept: A Dive into Digital Product Development

In the realm of product development and innovation, two terms are often bandied about with great fervor – ‘Prototype’ and ‘Proof of Concept’ (POC). These methodologies play pivotal roles in transforming an abstract idea into a tangible product, serving as critical stages in the pathway to commercialization. However, these terms are frequently misunderstood, often interchanged […]

/
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