---
title: "Rails 5.2 Blogs"
description: "BigBinary blog posts in the Rails 5.2 category."
canonical_url: "https://www.bigbinary.com/blog/categories/rails-5-2"
markdown_url: "https://www.bigbinary.com/blog/categories/rails-5-2.md"
---

# Rails 5.2 Blogs

BigBinary blog posts in the Rails 5.2 category.

## Posts

### Recyclable cache keys in Rails

[Recyclable cache keys in Rails](https://www.bigbinary.com/blog/rails-adds-support-for-recyclable-cache-keys)

- Author: Taha Husain
- Published: August 6, 2019
- Categories: Rails 5.2, Rails 6, Rails

Rails added cache_versioning and collection_cache_versioning to support
recyclable cache keys.

### Rails 5.2 DSL for configuring Content Security Policy

[Rails 5.2 DSL for configuring Content Security Policy](https://www.bigbinary.com/blog/rails-5-2-adds-dsl-for-configuring-content-security-policy-header)

- Author: Sushant Mittal
- Published: October 23, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 adds DSL for configuring Content Security Policy header

### Rails 5.2 stops some raw SQL, prevents SQL injections

[Rails 5.2 stops some raw SQL, prevents SQL injections](https://www.bigbinary.com/blog/rails-5-2-disallows-raw-sql-in-active-record)

- Author: Piyush Tiwari
- Published: October 16, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 disallows raw SQL in dangerous Active Record methods preventing SQL
injections

### Rails 5.2 added method write_multi to cache store

[Rails 5.2 added method write_multi to cache store](https://www.bigbinary.com/blog/rails-5.2-adds-write_multi-for-cache-writes)

- Author: Rohan Pujari
- Published: July 3, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 added method write_multi to cache store

### Rails 5.2 uses AES-256-GCM authenticated encryption

[Rails 5.2 uses AES-256-GCM authenticated encryption](https://www.bigbinary.com/blog/rails-5-2-uses-aes-256-gcm-authenticated-encryption-as-default-cipher-for-encrypting-messages)

- Author: Sushant Mittal
- Published: June 26, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 uses AES-256-GCM authenticated encryption as default cipher for
encrypting messages

### Rails 5.2 adds allow_other_host to redirect_back method

[Rails 5.2 adds allow_other_host to redirect_back method](https://www.bigbinary.com/blog/rails-5-2-adds-allow_other_host-option-to-redirect_back-method)

- Author: Mohit Natoo
- Published: May 30, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 introduces allow_other_host option to redirect_back method to handle
redirection for requests received from a different host

### Rails 5.2 fixes query caching in MySQL & PostgreSQL adapters

[Rails 5.2 fixes query caching in MySQL & PostgreSQL adapters](https://www.bigbinary.com/blog/rails-5-2-fixes-query-caching-in-mysql-and-postgresql-adapters)

- Author: Sushant Mittal
- Published: May 16, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 fixes query caching in MySQL and PostgreSQL adapters

### Rails 5.2 sets version in Gemfile & adds.ruby-version

[Rails 5.2 sets version in Gemfile & adds.ruby-version](https://www.bigbinary.com/blog/rails-5_2-adds-ruby-version-file-and-ruby-version-to-gemfile-by-default)

- Author: Mohit Natoo
- Published: May 7, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 sets Ruby version in Gemfile and adds.ruby-version file by default.

### Rails 5.2 Date#prev_occurring & Date#next_occurring

[Rails 5.2 Date#prev_occurring & Date#next_occurring](https://www.bigbinary.com/blog/rails-5-2-adds-date-methods-to-return-specified-next-or-previous-occurring-day-of-week)

- Author: Sushant Mittal
- Published: April 17, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 added Date#prev_occurring and Date#next_occurring to return specified
next/previous occurring day of week.

### Rails 5.2 adds default option to attribute accessors

[Rails 5.2 adds default option to attribute accessors](https://www.bigbinary.com/blog/rails-5-2-adds-default-options-to-module-and-class-attribute-accessors)

- Author: Vishal Telangre
- Published: February 27, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 now supports specifying a default value using 'default' option for the
module and class macros viz. mattr_accessor, mattr_reader, mattr_writer,
cattr_accessor, cattr_reader, and cattr_writer respectively.

### Rails 5.2 specifying default value for class_attribute

[Rails 5.2 specifying default value for class_attribute](https://www.bigbinary.com/blog/rails-5-2-supports-specifying-default-value-for-a-class_attribute)

- Author: Vishal Telangre
- Published: February 21, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 now supports specifying a default value for the class attributes
defined using \`class_attribute\`.

### Rails 5.2 allows mailers to use custom Active Job class

[Rails 5.2 allows mailers to use custom Active Job class](https://www.bigbinary.com/blog/rails-5-2-allows-mailers-to-use-custom-active-job-class)

- Author: Prathamesh Sonpatki
- Published: January 15, 2018
- Categories: Rails 5.2, Rails

Rails now allows to configure a job class for a mailer so that we can use custom
Active Job classes per mailer

### Rails 5.2 supports descending indexes for MySQL

[Rails 5.2 supports descending indexes for MySQL](https://www.bigbinary.com/blog/rails-5-2-supports-descending-indexes-for-mysql)

- Author: Chirag Shah
- Published: January 10, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 now supports descending indexes for MySQL for versions 8.0.1 and
higher.

### Rails 5.2 pass request params to Action Mailer previews

[Rails 5.2 pass request params to Action Mailer previews](https://www.bigbinary.com/blog/rails-5-2-allows-passing-request-params-to-action-mailer-previews)

- Author: Prathamesh Sonpatki
- Published: January 8, 2018
- Categories: Rails 5.2, Rails

A neat way to pass the params to the Action Mailer previews directly for better
debugging

### Rails 5.2 adds bootsnap to the app to speed up boot time

[Rails 5.2 adds bootsnap to the app to speed up boot time](https://www.bigbinary.com/blog/rails-5-2-adds-bootsnap-to-the-app-to-speed-up-boot-time)

- Author: Prathamesh Sonpatki
- Published: January 1, 2018
- Categories: Rails 5.2, Rails

Rails 5.2 adds bootsnap gem to the Gemfile of newly created app so as to speed
up boot time

### Rails 5.2 fetch_values for HashWithIndifferentAccess

[Rails 5.2 fetch_values for HashWithIndifferentAccess](https://www.bigbinary.com/blog/rails-5-2-implements-fetch_values-for-hashwithindifferentaccess)

- Author: Mohit Natoo
- Published: December 6, 2017
- Categories: Rails 5.2, Rails

Starting Rails 5.2 we'll be able to make use of fetch_values
HashWithIndifferentAccess analogous to its use on Hash.

### Rails 5.2 expiry option for signed & encrypted cookies

[Rails 5.2 expiry option for signed & encrypted cookies](https://www.bigbinary.com/blog/expirty-option-for-signed-and-encrypted-cookies-in-Rails-5-2)

- Author: Mohit Natoo
- Published: October 9, 2017
- Categories: Rails 5.2, Rails

Rails 5.2 adds expiry option for signed and encrypted cookies and adds relative
expiry time

## Links

- [Human page](https://www.bigbinary.com/blog/categories/rails-5-2)
