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
invision vs figma

InVision vs. Figma: Key Features, Differences, and Similarities.

Figma and InVision rank among the best UI design tools. Learn about their key features and how they can speed up front-end development. It’s hard to overstate the importance of UI design in web and mobile development. To be successful a digital product needs to be an eye-pleaser and a UX gem, in addition to […]

/
flutter language logo

Flutter: the number one framework for building cross-platform apps

Flutter is an SDK for building fast apps for different platforms. It comes with comprehensive development tools and streamlines designing high-performance UIs. Find out why Flutter is a top-quality and cost-effective alternative to native app development. Flutter is Google’s open-source toolkit for developing high-fidelity cross-platform applications. It allows you to create native software for Android […]

/
django hosting

Hosting for Django? Here’s what you need to know.

Django is a robust web framework for Python that enables programmers to swiftly build web apps. But once you’ve built your application, the next step is to get it online and available to the world. That’s where hosting comes in. In this article, we will explore the various options available for hosting Django applications. Types […]

/
front end technologies

Top-ranking front-end technologies. Best tools to speed up UI development in 2023

Flawless UI is a must if your app is headed for success. Designing a high-quality front-end can be costly and time-consuming, but not so much if you’re able to choose the right toolset for your product. Find out the best front-end development options to consider in 2023. Back-end powers the functionality of the system, while […]

/
nodejs books

Top 7 Node.js Books for Both Beginner and Professional Developers

Looking to advance your expertise in Node.js? If you’re tired of chaotic online resources, try good old-fashioned books. They will provide you with structured knowledge and give you a clear understanding of even the most complex programming concepts. Node.js is an asynchronous, event-driven, backend JavaScript runtime designed to develop scalable network applications. As a cross-platform […]

/
AR in fashion

AR in Fashion. Key Benefits and Real Use Cases

AR technology has already taken root in many industries. One of them is fashion. Clothing, beauty, and retail brands have long been leveraging AR solutions to attract customers and boost sales. According to recent estimates, the number of mobile augmented reality (AR) users worldwide will reach 1.7 billion by 2024 – a huge rise from […]

/
Related posts
invision vs figma

InVision vs. Figma: Key Features, Differences, and Similarities.

Figma and InVision rank among the best UI design tools. Learn about their key features and how they can speed up front-end development. It’s hard to overstate the importance of UI design in web and mobile development. To be successful a digital product needs to be an eye-pleaser and a UX gem, in addition to […]

/
flutter language logo

Flutter: the number one framework for building cross-platform apps

Flutter is an SDK for building fast apps for different platforms. It comes with comprehensive development tools and streamlines designing high-performance UIs. Find out why Flutter is a top-quality and cost-effective alternative to native app development. Flutter is Google’s open-source toolkit for developing high-fidelity cross-platform applications. It allows you to create native software for Android […]

/
django hosting

Hosting for Django? Here’s what you need to know.

Django is a robust web framework for Python that enables programmers to swiftly build web apps. But once you’ve built your application, the next step is to get it online and available to the world. That’s where hosting comes in. In this article, we will explore the various options available for hosting Django applications. Types […]

/
front end technologies

Top-ranking front-end technologies. Best tools to speed up UI development in 2023

Flawless UI is a must if your app is headed for success. Designing a high-quality front-end can be costly and time-consuming, but not so much if you’re able to choose the right toolset for your product. Find out the best front-end development options to consider in 2023. Back-end powers the functionality of the system, while […]

/
ruby on rails

Ruby on Rails Company Use Case: 14 Businesses that Use Ruby on Rails

Ruby on Rails is a web application framework written in Ruby, a dynamic and object-oriented programming language. It is intended to make web application programming simpler by assuming that all developers have the prerequisites for getting started. Rails is released under the MIT License and is maintained by David Heinemeier Hansson. Rails is known for […]

/
agile roles and responsibilities

Agile Roles and Responsibilities. Who’s Who in Agile Projects?

Agile teams aren’t like traditional project groups. They embrace self-organization and collaborate closely to achieve business goals. So, how many Agile roles are there, and what are their key responsibilities? Read on to find out. Agile is a set of management practices based on an iterative, time-boxed approach to software development. It originated in 2001 […]

/
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