Rails

Rails 6.1 Configurable Attribute Defaults

With Rails 6.1, we can set attribute's default value by keeping the type same

Rails Deprecates db:structure Tasks

Rails deprecates db:structure:load and db:structure:dump tasks in favor of db:schema tasks with schema_format config.

Rails Allows Prepending Concerns

This blog post discusses the concept of prepending in Ruby and prepending concerns with the help of Active Support in Rails.

Rails Adds Default Value to Rich Text Area

Rails has added support for adding a default value to the form field of type rich text area.

Rails db:migrate:name Behavior Changes

Rails now dumps schema and resets ActiveRecord::Base connection when running db:migrate:name.

Rails Adds --minimal Flag for New Apps

Rails introduces --minimal flag to generate a barebones application without extra frameworks.

Rails 6.1 Allows SQL Comments in OR Queries

ArgumentError used to be thrown when relations with SQL comments and Optimizer hints were combined using or. Rails edge(6.1.0.alpha) fixes that issue.

Rails Configurable web_image_content_types

Rails adds config.active_storage.web_image_content_types to make image content types configurable, supporting formats like webp.

ACID transactions in every day applications

Breaking down the use of ACID transactions using real-life examples of systems that we employ every day.

Rails 6.1 ActiveModel::Errors as Objects

Rails 6.1 changes ActiveModel::Errors from Hash to array of Error objects with where, add, delete.