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

# Rails Blogs

BigBinary blog posts in the Rails category.

## Posts

### Debugging a Stack Overflow in Rails 7.2.1.1

[Debugging a Stack Overflow in Rails 7.2.1.1](https://www.bigbinary.com/blog/debugging-stack-overflow-in-rails)

- Author: Vishnu M
- Published: November 25, 2025
- Categories: Rails, Ruby

Debugging a Stack Overflow in Rails 7.2.1.1

### Active Record adds support for deprecating associations

[Active Record adds support for deprecating associations](https://www.bigbinary.com/blog/active-record-deprecated-associations)

- Author: Chirag Shah
- Published: July 3, 2025
- Categories: Rails, Ruby

Active Record adds the ability to safely remove associations by first
deprecating them

### Active Job Continuations

[Active Job Continuations](https://www.bigbinary.com/blog/active-jobs-continuations)

- Author: Vishnu M
- Published: June 9, 2025
- Categories: Rails, Sidekiq, Ruby

Active job feature that allows us to describe jobs in an interruptible manner

### Understanding Queueing Theory

[Understanding Queueing Theory](https://www.bigbinary.com/blog/understanding-queueing-theory)

- Author: Vishnu M
- Published: June 3, 2025
- Categories: Rails, Sidekiq, Ruby, Solid Queue

### Understanding Active Record Connection Pooling

[Understanding Active Record Connection Pooling](https://www.bigbinary.com/blog/understanding-active-record-connection-pooling)

- Author: Vishnu M
- Published: May 13, 2025
- Categories: Rails, Puma, Ruby

### Finding the ideal threads per process with GVL tooling

[Finding the ideal threads per process with GVL tooling](https://www.bigbinary.com/blog/tuning-puma-max-threads-configuration-with-gvl-instrumentation)

- Author: Vishnu M
- Published: May 6, 2025
- Categories: Rails, Puma, Ruby

### Amdahl's Law: the relationship of speedup and concurrency

[Amdahl's Law: the relationship of speedup and concurrency](https://www.bigbinary.com/blog/amdahls-law-the-theoretical-relationship-between-speedup-and-concurrency)

- Author: Vishnu M
- Published: April 29, 2025
- Categories: Rails, Puma, Ruby

### The GVL in Ruby and its impact on scaling Rails

[The GVL in Ruby and its impact on scaling Rails](https://www.bigbinary.com/blog/gvl-in-ruby-and-its-impact-in-scaling-rails-applications)

- Author: Vishnu M
- Published: April 24, 2025
- Categories: Rails, Puma, Ruby

### Understanding how Puma handles requests

[Understanding how Puma handles requests](https://www.bigbinary.com/blog/understanding-puma-concurrency-and-the-effect-of-the-gvl-on-performance)

- Author: Vishnu M
- Published: April 23, 2025
- Categories: Rails, Puma, Ruby

### Scaling Rails Series

[Scaling Rails Series](https://www.bigbinary.com/blog/scaling-rails-series)

- Author: Vishnu M
- Published: April 22, 2025
- Categories: Rails, Puma

Scaling Rails

### Benchmarking caching in Rails with Redis vs the alternatives

[Benchmarking caching in Rails with Redis vs the alternatives](https://www.bigbinary.com/blog/caching-in-rails-with-redis-vs-alternatives)

- Author: Sandip Mane
- Published: February 4, 2025
- Categories: Rails

Benchmarking caching in Rails including Redis, Memcached, Valkey, DragonflyDB,
SolidCache with PostgreSQL, SolidCache with SQLite3, and LiteCache with SQLite3.

### Safely dropping tables and renaming columns in Rails

[Safely dropping tables and renaming columns in Rails](https://www.bigbinary.com/blog/rails-8-deleting-tables-columns-using-rubocop)

- Author: Abhay V Ashokan
- Published: September 17, 2024
- Categories: Rails

Dropping tables and columns in a safe way in Ruby on Rails

### Upgrade Ruby using dual boot

[Upgrade Ruby using dual boot](https://www.bigbinary.com/blog/ruby-upgrade-using-dual-boot)

- Author: Vijay Vinod
- Published: September 4, 2024
- Categories: Ruby, Rails

Upgrade Ruby using dual boot

### Standardizing pagination, sorting and search in code

[Standardizing pagination, sorting and search in code](https://www.bigbinary.com/blog/standardize-pagination-keywords)

- Author: Abilash Sajeev
- Published: August 27, 2024
- Categories: ReactJS, Rails

Explore the power of standardized naming practices in creating a unified and
scalable codebase.

### Rails 7.2 adds SQL query counts to rendering logs

[Rails 7.2 adds SQL query counts to rendering logs](https://www.bigbinary.com/blog/rails-8-adds-sql-queries-count-to-template-rendering-logs)

- Author: Navaneeth D
- Published: August 20, 2024
- Categories: Rails, Rails 7.2

Rails 7.2 simplifies debugging database queries by adding query count
information to the application logs.

### Rails 8 introduces a basic authentication generator

[Rails 8 introduces a basic authentication generator](https://www.bigbinary.com/blog/rails-8-introduces-a-basic-authentication-generator)

- Author: Jaimy Simon
- Published: August 9, 2024
- Categories: Rails, Rails 8

Rails 8.0 adds a generator that streamlines the process of adding basic
authentication to Rails applications

### Managing templates across Neeto with neeto-templates-nano

[Managing templates across Neeto with neeto-templates-nano](https://www.bigbinary.com/blog/how-build-neeto-templates-nano)

- Author: Sooraj Bhaskaran
- Published: July 30, 2024
- Categories: Rails, React

A deep dive into the architecture and implementation of neeto-templates-nano, a
highly customizable and extensible template builder for neeto.

### Rails 7.2 makes counter_cache integration safer and easier

[Rails 7.2 makes counter_cache integration safer and easier](https://www.bigbinary.com/blog/rails-8-adds-ability-to-ignore-counter_cache-column-while-backfilling)

- Author: Navaneeth D
- Published: July 16, 2024
- Categories: Rails, Rails 7.2

Rails 7.2 adds ability to ignore counter_cache column whilst the data is getting
backfilled

### Automating error pages based on API responses

[Automating error pages based on API responses](https://www.bigbinary.com/blog/automatically-displaying-errors)

- Author: Farhan CK
- Published: May 28, 2024
- Categories: ReactJS, Rails

How we automated displaying error pages based on API responses

### How we migrated from Sidekiq to Solid Queue

[How we migrated from Sidekiq to Solid Queue](https://www.bigbinary.com/blog/migrating-to-solid-queue-from-sidekiq)

- Author: Chirag Shah
- Published: March 5, 2024
- Categories: Rails, Solid Queue

How we migrated to Solid Queue from Sidekiq

### Rails 8 introduces a built-in rate limiting API

[Rails 8 introduces a built-in rate limiting API](https://www.bigbinary.com/blog/rails-8-rate-limiting-api)

- Author: Yedhin Kizhakkethara
- Published: February 13, 2024
- Categories: Rails, Rails 8

Rails 8.0 adds rate limiting to ActionController which uses Active Support cache
by default

### Sharing data across React apps with globalProps

[Sharing data across React apps with globalProps](https://www.bigbinary.com/blog/global-props)

- Author: Deepak Jose
- Published: February 6, 2024
- Categories: React, Rails

Using globalProps to make it easier to share data in React.js applications

### Solid Queue & understanding UPDATE SKIP LOCKED

[Solid Queue & understanding UPDATE SKIP LOCKED](https://www.bigbinary.com/blog/solid-queue)

- Author: Chirag Shah
- Published: January 23, 2024
- Categories: Rails, Solid Queue

Introduction to solid queue

### Rails 7.1 allows subscribing to transaction events

[Rails 7.1 allows subscribing to transaction events](https://www.bigbinary.com/blog/rails-7-1-allows-subscribing-to-active-record-transaction-events)

- Author: Vishnu M
- Published: January 16, 2024
- Categories: Rails, Rails 7

Rails 7.1 allows subscribing to Active Record transaction events for
instrumentation.

### Using Cloudflare as CDN for Rails applications

[Using Cloudflare as CDN for Rails applications](https://www.bigbinary.com/blog/using-cloudflare-as-cdn-for-rails-applications)

- Author: Abhijith Sheheer
- Published: December 19, 2023
- Categories: Cloudflare, Rails

How we used Cloudflare to cache assets for Rails applications to improve website
performance

### Rails 7.1 adds path_params option to url_for

[Rails 7.1 adds path_params option to url_for](https://www.bigbinary.com/blog/url-for-path-params-options)

- Author: Neenu Chacko
- Published: November 7, 2023
- Categories: Rails, Rails 7

Rails 7.1 adds new option path_params for url_for helper method

### Rails 7.1 optimizes the default SQLite3 configuration

[Rails 7.1 optimizes the default SQLite3 configuration](https://www.bigbinary.com/blog/rails-7-1-comes-with-an-optimized-default-sqlite3-adapter-connection-configuration)

- Author: Vishnu M
- Published: October 31, 2023
- Categories: Rails, Rails 7

Rails 7.1 comes with an optimized default SQLite3 adapter connection
configuration

### Rails 7.1 adds multi-column ordering to batch processing

[Rails 7.1 adds multi-column ordering to batch processing](https://www.bigbinary.com/blog/rails-7-1-adds-support-for-multi-column-ordering-in-activerecord-batches)

- Author: Navaneeth D
- Published: October 3, 2023
- Categories: Rails, Rails 7

Rails 7.1 adds support for multi-column ordering in ActiveRecord::Batches.

### Rails 7.1 adds \*\_deliver callbacks to Action Mailer

[Rails 7.1 adds \*\_deliver callbacks to Action Mailer](https://www.bigbinary.com/blog/rails-7-1-adds-_-deliver-callbacks-to-action-mailer)

- Author: Calvin Chiramal
- Published: September 26, 2023
- Categories: Rails, Rails 7

Rails 7.1 adds \*\_deliver callbacks to Action Mailer

### Rails 7.1 adds options to ActiveRecord::Relation#explain

[Rails 7.1 adds options to ActiveRecord::Relation#explain](https://www.bigbinary.com/blog/rails-7-1-adds-options-to-activerecord-relation-explain)

- Author: Vishnu M
- Published: July 4, 2023
- Categories: Rails, Rails 7

Rails 7.1 enables detailed query plan analysis with options in
ActiveRecord::Relation#explain.

### Rails 7.1 adds ActiveRecord::Base::normalizes

[Rails 7.1 adds ActiveRecord::Base::normalizes](https://www.bigbinary.com/blog/rails-7-1-adds-activerecord-base-normalizes)

- Author: Abhijith Sheheer
- Published: May 9, 2023
- Categories: Rails, Rails 7

Rails 7.1 adds ActiveRecord::Base::normalizes.

### Rails 7.1 logs the caller that enqueued a job

[Rails 7.1 logs the caller that enqueued a job](https://www.bigbinary.com/blog/rails-7-1-adds-support-for-logging-background-job-enqueue-callers)

- Author: Vishnu M
- Published: April 18, 2023
- Categories: Rails, Rails 7

Rails 7.1 adds support for logging background job enqueue callers.

### Rails 7.1 adds ActiveJob.perform_all_later

[Rails 7.1 adds ActiveJob.perform_all_later](https://www.bigbinary.com/blog/rails-7-1-adds-activejob-perform-all-later)

- Author: Vishnu M
- Published: February 28, 2023
- Categories: Rails, Rails 7

Rails 7.1 adds ActiveJob.perform_all_later to enqueue multiple jobs at once.

### Rails 7.1 adds adapter option to disallow foreign keys

[Rails 7.1 adds adapter option to disallow foreign keys](https://www.bigbinary.com/blog/rails-7-1-adds-adapter-option-to-disallow-foregin-keys)

- Author: Aditya Bhutani
- Published: February 21, 2023
- Categories: Rails, Rails 7

Rails 7.1 adds adapter option to disallow foreign keys

### Rails 7.1 allows aliased attributes in insert_all

[Rails 7.1 allows aliased attributes in insert_all](https://www.bigbinary.com/blog/rails-7-1-allows-using-aliased-attributes-with-insert_all-upsert_all)

- Author: Aditya Bhutani
- Published: January 11, 2023
- Categories: Rails, Rails 7

Rails 7.1 allows using aliased attributes with insert_all/upsert_all

### How we upgraded from Rails 6 to Rails 7

[How we upgraded from Rails 6 to Rails 7](https://www.bigbinary.com/blog/how-we-upgraded-from-rails-6-to-rails-7)

- Author: Abhishek T
- Published: September 20, 2022
- Categories: Rails, Rails 7

How we upgraded from Rails 6 to Rails 7

### Three case studies of debugging redis running out of memory

[Three case studies of debugging redis running out of memory](https://www.bigbinary.com/blog/debugging-redis-memory-issue)

- Author: Unnikrishnan KP
- Published: September 12, 2022
- Categories: Ruby, Rails

Three case studies of debugging redis running out of memory

### Rails 7.1 allows infinite ranges in length validators

[Rails 7.1 allows infinite ranges in length validators](https://www.bigbinary.com/blog/rails-7-adds-endless-ranges-for-activemodel-validations)

- Author: Ghouse Mohamed
- Published: August 30, 2022
- Categories: Rails, Rails 7

Rails 7.1 allows infinite ranges for LengthValidators and Clusivity validators

### Rails 7.1 raises if Active Storage service is missing

[Rails 7.1 raises if Active Storage service is missing](https://www.bigbinary.com/blog/rails-7-1-raises-error-if-active-storage-service-not-specified)

- Author: Ghouse Mohamed
- Published: August 23, 2022
- Categories: Rails, Rails 7

Rails 7.1 raises RuntimeError if Active Storage service is not specified

### Rails 7.1 adds Action Cable connection-level callbacks

[Rails 7.1 adds Action Cable connection-level callbacks](https://www.bigbinary.com/blog/rails-7-1-adds-callbacks-for-action-cable-connection)

- Author: Ghouse Mohamed
- Published: August 2, 2022
- Categories: Rails, Rails 7

Rails 7.1 adds callbacks for Action Cable commands at the connection level

### Rails 7.1 audio_tag and video_tag accept Active Storage

[Rails 7.1 audio_tag and video_tag accept Active Storage](https://www.bigbinary.com/blog/rails-7-extends-support-for-audio-tag-and-video-tag)

- Author: Ghouse Mohamed
- Published: July 27, 2022
- Categories: Rails, Rails 7

Rails 7.1 allows audio_tag and video_tag to receive Active Storage attachments

### Rails 7.1 returns Active Storage attachments after save

[Rails 7.1 returns Active Storage attachments after save](https://www.bigbinary.com/blog/rails-7-returns-active-storage-blob-after-save)

- Author: Ghouse Mohamed
- Published: July 26, 2022
- Categories: Rails, Rails 7

Rails 7.1 returns the Active Storage attachment(s) after saving the attachment

### Handling SIGHUP error from Heroku

[Handling SIGHUP error from Heroku](https://www.bigbinary.com/blog/fix-sighup-error-from-heroku)

- Author: Unnikrishnan KP
- Published: April 4, 2022
- Categories: Rails

Handling SIGHUP error from Heroku

### Rails 7 adds only_numeric option to numericality validator

[Rails 7 adds only_numeric option to numericality validator](https://www.bigbinary.com/blog/rails-7-adds-only_numeric-option-to-numericality-validator)

- Author: Aditya Bhutani
- Published: January 17, 2022
- Categories: Rails, Rails 7

Rails 7 adds only_numeric option to numericality validator

### Rails 7 adds Pathname#existence

[Rails 7 adds Pathname#existence](https://www.bigbinary.com/blog/rails-7-adds-pathname-existence)

- Author: Ashik Salman
- Published: December 7, 2021
- Categories: Rails, Rails 7

Rails 7 adds Pathname#existence

### Fixing slow Rails page loads by finding n+1 queries

[Fixing slow Rails page loads by finding n+1 queries](https://www.bigbinary.com/blog/fix-slow-page-loads-in-a-ruby-on-rails-application)

- Author: Unnikrishnan KP
- Published: December 1, 2021
- Categories: Rails

Fix slow page loads in a Ruby on Rails application by identifying n+1 queries

### Rails 7 adds nested attributes support to delegated_type

[Rails 7 adds nested attributes support to delegated_type](https://www.bigbinary.com/blog/rails-7-adds-accepts-nested-attributes-for-support-for-delegated_type)

- Author: Ashik Salman
- Published: November 23, 2021
- Categories: Rails, Rails 7

Rails 7 adds accepts_nested_attributes_for support for delegated_type

### Rails 7 adds from option to assert_no_changes

[Rails 7 adds from option to assert_no_changes](https://www.bigbinary.com/blog/rails-7-adds-from-option-to-assert_no_changes)

- Author: Gaurav Varma
- Published: November 19, 2021
- Categories: Rails, Rails 7

Rails 7 Adds from option to ActiveSupport::TestCase#assert_no_changes

### Rails 7 adds ActiveRecord::Base#previously_persisted?

[Rails 7 adds ActiveRecord::Base#previously_persisted?](https://www.bigbinary.com/blog/rails-7-adds-activerecord-previously_persisted)

- Author: Gaurav Varma
- Published: November 9, 2021
- Categories: Rails, Rails 7

Rails 7 adds ActiveRecord::Base#previously_persisted?

### Rails 7 adds weekday_options_for_select and weekday_select

[Rails 7 adds weekday_options_for_select and weekday_select](https://www.bigbinary.com/blog/rails-7-adds-weekday_options_for_select-and-weekday_select)

- Author: Gaurav Varma
- Published: November 9, 2021
- Categories: Rails, Rails 7

Rails 7 adds weekday_options_for_select and weekday_select

### Rails 7 replaced byebug with ruby/debug

[Rails 7 replaced byebug with ruby/debug](https://www.bigbinary.com/blog/rails-7-replaced-byebug-with-ruby-debug)

- Author: Gaurav Varma
- Published: November 9, 2021
- Categories: Rails, Rails 7

Rails 7 replaced byebug with ruby/debug

### Rails 7 adds ActiveRecord::QueryMethods#in_order_of

[Rails 7 adds ActiveRecord::QueryMethods#in_order_of](https://www.bigbinary.com/blog/rails-7-adds-activerecord-query-methods-in-order-of)

- Author: Ashik Salman
- Published: November 2, 2021
- Categories: Rails, Rails 7

Ruby 7.0 adds ActiveRecord::QueryMethods#in_order_of

### Rails 7 adds disable_joins for associations

[Rails 7 adds disable_joins for associations](https://www.bigbinary.com/blog/rails-7-adds-disable-joins-for-associations)

- Author: Ashik Salman
- Published: October 26, 2021
- Categories: Rails, Rails 7

Ruby 7.0 adds disable_joins for associations

### Rails 7 adds the ability to use pre-defined variants

[Rails 7 adds the ability to use pre-defined variants](https://www.bigbinary.com/blog/rails-7-adds-ability-to-use-predefined-variants)

- Author: Gaurav Varma
- Published: October 19, 2021
- Categories: Rails, Rails 7

Rails 7 adds the ability to use pre-defined variants

### Rails 7 adds a setting to enumerate columns in select

[Rails 7 adds a setting to enumerate columns in select](https://www.bigbinary.com/blog/rails-7-adds-setting-for-enumerating-columns-in-select-statements)

- Author: Ashik Salman
- Published: October 13, 2021
- Categories: Rails, Rails 7

Ruby 7.0 adds setting for enumerating columns in select statements

### Reducing memory bloat of a Ruby on Rails application

[Reducing memory bloat of a Ruby on Rails application](https://www.bigbinary.com/blog/reducing-memory-bloat-in-a-ruby-on-rails-application)

- Author: Unnikrishnan KP
- Published: October 12, 2021
- Categories: Rails

Reducing the memory bloat of a Ruby on Rails application

### Rails 7 adds ComparisonValidator to ActiveRecord

[Rails 7 adds ComparisonValidator to ActiveRecord](https://www.bigbinary.com/blog/rails-7-adds-comparison-validator-to-active-record)

- Author: Gaurav Varma
- Published: October 5, 2021
- Categories: Rails, Rails 7

Ruby 7.0 adds ComparisonValidator to ActiveRecord

### Rails 7 adds ActiveRecord::Relation#structurally_compatible?

[Rails 7 adds ActiveRecord::Relation#structurally_compatible?](https://www.bigbinary.com/blog/rails-7-adds-active-record-relation-structurally-compatible)

- Author: Gaurav Varma
- Published: September 15, 2021
- Categories: Rails, Rails 7

Rails 7.0 adds ActiveRecord::Relation#structurally_compatible?

### Rails 7 deprecates Enumerable#sum and Array#sum

[Rails 7 deprecates Enumerable#sum and Array#sum](https://www.bigbinary.com/blog/rails-7-deprecates-enumerable-sum-and-array-sum)

- Author: Aashish Saini
- Published: June 22, 2021
- Categories: Rails, Rails 7

Rails 7 deprecates Enumerable#sum and Array#sum

### Rails 7 adds method calls for nested secrets

[Rails 7 adds method calls for nested secrets](https://www.bigbinary.com/blog/rails-7-adds-method-calls-for-nested-secrets)

- Author: Ashik Salman
- Published: June 9, 2021
- Categories: Rails, Rails 7

Rails 7.0 adds method calls for nested secrets

### Rails 6.1 adds invert_where method

[Rails 6.1 adds invert_where method](https://www.bigbinary.com/blog/rails-6-1-adds-invert_where)

- Author: Chimed Palden
- Published: May 4, 2021
- Categories: Rails, Rails 6.1

Rails 6.1 adds invert_where method

### Rails 7.0 adds encryption to Active Record models

[Rails 7.0 adds encryption to Active Record models](https://www.bigbinary.com/blog/rails-7-adds-encryption-to-active-record)

- Author: Akhil Gautam
- Published: May 4, 2021
- Categories: Rails, Rails 7

Rails 7.0 adds encryption to Active Record models

### Rails 7 adds Enumerable#sole

[Rails 7 adds Enumerable#sole](https://www.bigbinary.com/blog/rails-7-adds-enumerable-sole)

- Author: Ashik Salman
- Published: April 27, 2021
- Categories: Rails, Rails 7

Rails 7.0 adds Enumerable#sole

### Rails 6.1 adds in: option to validate numeric ranges

[Rails 6.1 adds in: option to validate numeric ranges](https://www.bigbinary.com/blog/rails-6-1-adds-validate-numericality-in-range-option)

- Author: Akanksha Jain
- Published: April 14, 2021
- Categories: Rails, Rails 6.1

Rails 6.1 adds support for validating numeric values that fall within a specific
range using the \`in:\` option

### Rails 6.1 adds delegated_type to ActiveRecord

[Rails 6.1 adds delegated_type to ActiveRecord](https://www.bigbinary.com/blog/rails-6-1-adds-delegated-type-to-active-record)

- Author: Akhil Gautam
- Published: April 6, 2021
- Categories: Rails, Rails 6.1

Rails 6.1 adds delegated_type to ActiveRecord

### Rails 7 adds build/create constructors to has_one:through

[Rails 7 adds build/create constructors to has_one:through](https://www.bigbinary.com/blog/rails-7-allows-build-and-create-association-constructors-on-has-one-through)

- Author: Akanksha Jain
- Published: April 6, 2021
- Categories: Rails, Rails 7

Rails 7 allows constructors (build_association and create_association) on
has_one:through associations

### Rails 7 adds Enumerable#in_order_of

[Rails 7 adds Enumerable#in_order_of](https://www.bigbinary.com/blog/rails-7-adds-enumerable-in-order-of)

- Author: Ashik Salman
- Published: March 23, 2021
- Categories: Rails, Rails 7

Rails 7.0 adds Enumerable#in_order_of

### Rails 7 adds ActiveRecord::Relation#excluding

[Rails 7 adds ActiveRecord::Relation#excluding](https://www.bigbinary.com/blog/rails-7-adds-activerecord-relation-excluding)

- Author: Ashik Salman
- Published: March 16, 2021
- Categories: Rails, Rails 7

Rails 7.0 adds ActiveRecord::Relation#excluding

### Rails 6.1 adds nulls_first and nulls_last to Arel

[Rails 6.1 adds nulls_first and nulls_last to Arel](https://www.bigbinary.com/blog/rails-6-1-adds-nulls-first-and-nulls-last-to-arel)

- Author: Berin Larson
- Published: March 9, 2021
- Categories: Rails, Rails 6.1

Rails 6.1 adds nulls_first and nulls_last methods to Arel for PostgreSQL

### Rails 7 adds sole and find_sole_by finder methods

[Rails 7 adds sole and find_sole_by finder methods](https://www.bigbinary.com/blog/rails-7-adds-active-record-finder-methods)

- Author: Akanksha Jain
- Published: March 2, 2021
- Categories: Rails, Rails 7

Rails 7.0 adds ActiveRecord::FinderMethods \`#sole\` and \`#find_sole_by\`

### Rails 7 adds Enumerable#maximum

[Rails 7 adds Enumerable#maximum](https://www.bigbinary.com/blog/rails-7-adds-enumerable-maximum)

- Author: Ashik Salman
- Published: February 23, 2021
- Categories: Rails, Rails 7

Rails 7.0 adds Enumerable#maximum

### Rails 6.1 adds support for PostgreSQL interval data type

[Rails 6.1 adds support for PostgreSQL interval data type](https://www.bigbinary.com/blog/rails-6-1-adds-postgresql-interval-data-type)

- Author: Akhil Gautam
- Published: January 26, 2021
- Categories: Rails, Rails 6.1

Rails 6.1 adds support for PostgreSQL interval data type

### Rails 6.1 allows per environment Active Storage config

[Rails 6.1 allows per environment Active Storage config](https://www.bigbinary.com/blog/rails-6-1-allows-per-environment-configuration-support-for-active-storage)

- Author: Shashank
- Published: January 20, 2021
- Categories: Rails, Rails 6.1

Rails 6.1 allows per environment configuration support for Active Storage

### Rails 6.1 adds support for belongs_to to has_many inversing

[Rails 6.1 adds support for belongs_to to has_many inversing](https://www.bigbinary.com/blog/rails-6-1-adds-support-for-belongs_to-to-has_many-inversing)

- Author: Siddharth Shringi
- Published: January 19, 2021
- Categories: Rails, Rails 6.1

Rails 6.1 adds support for belongs_to to has_many inversing

### Database-specific rake tasks for multi-database apps

[Database-specific rake tasks for multi-database apps](https://www.bigbinary.com/blog/rails-6-1-adds-additional-database-specific-tasks)

- Author: Amit Gupta
- Published: January 13, 2021
- Categories: Rails 6.1, Rails

Additional database-specific rake tasks for multi-database users

### Rails 6.1 adds strict_loading to catch lazy loading

[Rails 6.1 adds strict_loading to catch lazy loading](https://www.bigbinary.com/blog/rails-6-1-adds-strict_loading-to-warn-lazy-loading-associations)

- Author: Dinesh Panda
- Published: January 6, 2021
- Categories: Rails, Rails 6.1

Rails 6.1 adds strict_loading to warn lazy loading associations

### Rails 6.1 allows default_scope to be run on all queries

[Rails 6.1 allows default_scope to be run on all queries](https://www.bigbinary.com/blog/rails-6-1-allows-default_scope-to-be-run-on-all-queries)

- Author: Unnikrishnan KP
- Published: December 29, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 allows default_scope to be run on all queries

### Rails 6.1 adds where.associated for association presence

[Rails 6.1 adds where.associated for association presence](https://www.bigbinary.com/blog/rails-6-1-adds-where-associated-to-check-association-presence)

- Author: Nithin Krishna
- Published: December 18, 2020
- Categories: Rails, Rails 6.1

Rails 6.1 adds where.associated to check association presence

### Rails 6.1 raises on impossible camelcase inflections

[Rails 6.1 raises on impossible camelcase inflections](https://www.bigbinary.com/blog/rails-6-1-raises-error-for-impossible-camelcase-inflections)

- Author: Yedhin Kizhakkethara
- Published: December 15, 2020
- Categories: Rails, Rails 6.1

Rails 6.1 raises an error if camelcase inflection is not possible with Rails
generator

### Rails 6.1 allows associations to be destroyed asynchronously

[Rails 6.1 allows associations to be destroyed asynchronously](https://www.bigbinary.com/blog/rails-6-1-allows-associations-to-support-destroy_async-option-with-dependent-key)

- Author: Srijan Kapoor
- Published: December 8, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 allows associations to support destroy_async option with dependent key

### Reduce asset delivery time from 30 to 3 seconds with CDN

[Reduce asset delivery time from 30 to 3 seconds with CDN](https://www.bigbinary.com/blog/using-cloudfront-cdn-to-reduce-asset-delivery-time-from-30-seconds-to-3-seconds)

- Author: Vinay Chandran
- Published: November 24, 2020
- Categories: Rails

Using Cloudfront CDN to reduce asset delivery time from 30 seconds to 3 seconds

### Rails 6.1 adds values_at attribute method for Active Record

[Rails 6.1 adds values_at attribute method for Active Record](https://www.bigbinary.com/blog/rails-6-1-adds-values_at-attribute-method-for-active-record)

- Author: Chetan Gawai
- Published: November 17, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 adds values_at attribute method for Active Record

### Skipping the test database with SKIP_TEST_DATABASE

[Skipping the test database with SKIP_TEST_DATABASE](https://www.bigbinary.com/blog/database-tasks-can-skip_test_database-with-an-environment-variable)

- Author: Sandip Mane
- Published: October 27, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 adds ability to skip modifying test database in database tasks with an
environment variable.

### Rails 6.1 supports ORDER BY in batch processing

[Rails 6.1 supports ORDER BY in batch processing](https://www.bigbinary.com/blog/rails-6-1-supports-order-desc-for-find_each-find_in_batches-and-in_batches)

- Author: Sagar Patil
- Published: October 22, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 supports order DESC for find_each, find_in_batches, and in_batches

### Rails 6.1 deprecates structure:dump/load rake tasks

[Rails 6.1 deprecates structure:dump/load rake tasks](https://www.bigbinary.com/blog/rails-6-1-deprecates-rails-db-structure-dump)

- Author: Chetan Gawai
- Published: September 22, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 deprecates rails db:structure:dump and rails db:structure:load

### Rails 6.1 adds --minimal option support

[Rails 6.1 adds --minimal option support](https://www.bigbinary.com/blog/rails-6-1-adds-minimal-option-support)

- Author: Sandip Mane
- Published: September 8, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 adds --minimal support to create bare minimum app

### Rails 6 adds support to persist timezones of Active Job

[Rails 6 adds support to persist timezones of Active Job](https://www.bigbinary.com/blog/rails-6-add-timezone-support-in-active-job)

- Author: Chetan Gawai
- Published: September 1, 2020
- Categories: Rails 6, Rails

Rails 6 now records current timezone of Active Job

### Rails 6 adds including & excluding method on Enumerables

[Rails 6 adds including & excluding method on Enumerables](https://www.bigbinary.com/blog/rails-6-adds-array-including-excluding-and-enumerable-including-excluding)

- Author: Akhil Gautam
- Published: August 18, 2020
- Categories: Rails 6, Rails

Rails 6 adds Array#including/excluding and Enumerable#including/excluding

### Rails 6.1 raises on rollback with multiple databases

[Rails 6.1 raises on rollback with multiple databases](https://www.bigbinary.com/blog/rails-6-1-raises-on-db-rollback-for-multiple-database-applications)

- Author: Srijan Kapoor
- Published: August 12, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 raises on db:rollback for multiple database applications

### Rails 6.1 creates abstract classes in multiple database mode

[Rails 6.1 creates abstract classes in multiple database mode](https://www.bigbinary.com/blog/rails-6-1-automatically-generates-abstract-class-when-using-multiple-databases)

- Author: Akhil Gautam
- Published: August 4, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 automatically generates abstract class when generating scaffold in
another database

### Rails 6.1 deprecates exit statements in transactions

[Rails 6.1 deprecates exit statements in transactions](https://www.bigbinary.com/blog/rails-6-1-deprecates-the-use-of-return-break-or-throw-to-exit-a-transaction-block)

- Author: Sandip Mane
- Published: August 4, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 deprecates the use of return, break or throw to exit a transaction
block

### Rendering a Liquid template inside a Liquid template

[Rendering a Liquid template inside a Liquid template](https://www.bigbinary.com/blog/render-liquid-templates-when-the-template-refers-to-other-liquid-templates)

- Author: Sandip Mane
- Published: August 4, 2020
- Categories: Rails

How to render liquid templates when the template refers to other liquid
templates

### Rails 6.1 adds annotate_rendered_view_with_filenames

[Rails 6.1 adds annotate_rendered_view_with_filenames](https://www.bigbinary.com/blog/rails-6-1-adds-annotate_rendered_view_with_filenames-to-annotate-html-output)

- Author: Akhil Gautam
- Published: July 29, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 adds ActionView::Base.annotate_rendered_view_with_filenames to
annotate HTML output

### Rails 6.1 allows a default value for enum attributes

[Rails 6.1 allows a default value for enum attributes](https://www.bigbinary.com/blog/rails-6-1-allows-enums-attributes-to-have-default-value)

- Author: Abhay Nikam
- Published: July 21, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 allows enums attributes to configure the default value

### Rails 6.1 adds support for where with a comparison operator

[Rails 6.1 adds support for where with a comparison operator](https://www.bigbinary.com/blog/rails-6-1-adds-support-for-where-with-comparison-operator)

- Author: Abhay Nikam
- Published: July 14, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 adds support for where with a comparison operator

### Rails 6.1 tracks Active Storage variant in the database

[Rails 6.1 tracks Active Storage variant in the database](https://www.bigbinary.com/blog/rails-6-1-tracks-active-storage-variant-in-the-database)

- Author: Abhay Nikam
- Published: June 30, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 tracks Active Storage variant in the database

### Rails 6 fixes after_commit callback invocation bug

[Rails 6 fixes after_commit callback invocation bug](https://www.bigbinary.com/blog/rails-6-fixes-a-bug-where-after_commit-callbacks-are-called-on-failed-update-in-a-transaction-block)

- Author: Amit Choudhary
- Published: February 25, 2020
- Categories: Rails 6, Rails

Rails 6 fixes a bug where after_commit callbacks are called on failed update in
a transaction block

### Rails 6.1 introduces class_names helper

[Rails 6.1 introduces class_names helper](https://www.bigbinary.com/blog/rails-6-1-introduces-class_names-helper)

- Author: Abhay Nikam
- Published: February 4, 2020
- Categories: Rails 6.1, Rails

Rails 6.1 introduces class_names helper to conditionally add CSS classes.

### Rails Multiple Polymorphic Joins

[Rails Multiple Polymorphic Joins](https://www.bigbinary.com/blog/rails-multiple-polymorphic-joins)

- Author: Priyank Gupta
- Published: January 7, 2020
- Categories: Rails

Implement multiple polymorphic joins in rails

### Rails 6 adds rails db:prepare to migrate or setup a database

[Rails 6 adds rails db:prepare to migrate or setup a database](https://www.bigbinary.com/blog/rails-6-adds-rails-db-prepare-to-migrate-or-setup-a-database)

- Author: Akhil Gautam
- Published: December 10, 2019
- Categories: Rails 6, Rails

Rails 6 adds rails db:prepare to migrate or setup a database if it doesn't exist

### Rails 6.1 adds \*\_previously_was attribute methods

[Rails 6.1 adds \*\_previously_was attribute methods](https://www.bigbinary.com/blog/rails-6-1-adds-_previously_was-attribute-methods)

- Author: Abhay Nikam
- Published: December 3, 2019
- Categories: Rails 6.1, Rails

Rails 6.1 adds \*\_previously_was attribute methods for dirty tracking

### Rails 6 adds guard against DNS Rebinding attacks

[Rails 6 adds guard against DNS Rebinding attacks](https://www.bigbinary.com/blog/rails-6-adds-guard-against-dns-rebinding-attacks)

- Author: Midhun Krishna
- Published: November 5, 2019
- Categories: Rails 6, Rails

Rails 6 adds guard against DNS Rebinding attacks by whitelisting hosts via
configuration

### Rails 6 adds ActiveStorage::Blob#open

[Rails 6 adds ActiveStorage::Blob#open](https://www.bigbinary.com/blog/rails-6-adds-activestorage-blob-open)

- Author: Akhil Gautam
- Published: October 30, 2019
- Categories: Rails 6, Rails

Rails 6 adds ActiveStorage::Blob#open

### Rails 6 adds ActionMailer#email_address_with_name

[Rails 6 adds ActionMailer#email_address_with_name](https://www.bigbinary.com/blog/rails-6-adds-actionmailer-email_address_with_name)

- Author: Taha Husain
- Published: October 22, 2019
- Categories: Rails 6, Rails

Rails 6 adds email_address_with_name to ActionMailer to properly escape email
addresses with names.

### Rails 6 raises ArgumentError if param contains colon

[Rails 6 raises ArgumentError if param contains colon](https://www.bigbinary.com/blog/rails-6-raises-argumenterror-if-custom-param-contains-a-colon)

- Author: Amit Choudhary
- Published: October 15, 2019
- Categories: Rails 6, Rails

Rails 6 raises ArgumentError if custom param contains a colon

### Rails 6 introduces new code loader called Zeitwerk

[Rails 6 introduces new code loader called Zeitwerk](https://www.bigbinary.com/blog/rails-6-introduces-new-code-loader-called-zeitwerk)

- Author: Midhun Krishna
- Published: October 8, 2019
- Categories: Rails 6, Rails

Rails 6 introduces new code loader named Zeitwerk with better Ruby semantics and
threadsafety

### Rails 6 adds ActiveSupport::ActionableError

[Rails 6 adds ActiveSupport::ActionableError](https://www.bigbinary.com/blog/rails-6-adds-active-support-actionable-error)

- Author: Taha Husain
- Published: October 1, 2019
- Categories: Rails 6, Rails

Rails 6 adds support for dispatching actions from error page

### Rails 6 add_foreign_key & remove_foreign_key SQLite3

[Rails 6 add_foreign_key & remove_foreign_key SQLite3](https://www.bigbinary.com/blog/rails-6-adds-add_foreign_key-and-remove_foreign_key-for-sqlite3)

- Author: Amit Choudhary
- Published: September 24, 2019
- Categories: Rails 6, Rails

Rails 6 adds add_foreign_key and remove_foreign_key for SQLite3

### Rails 6 adds ActionDispatch::Request::Session#dig

[Rails 6 adds ActionDispatch::Request::Session#dig](https://www.bigbinary.com/blog/rails-6-adds-actiondispatch-request-session-dig)

- Author: Amit Choudhary
- Published: September 18, 2019
- Categories: Rails 6, Rails

Rails 6 adds ActionDispatch::Request::Session#dig

### Marking arrays of translations safe using html suffix

[Marking arrays of translations safe using html suffix](https://www.bigbinary.com/blog/rails-6-marks-arrays-of-translations-as-trusted-safe-by-using-the-_html-suffix)

- Author: Vishal Telangre
- Published: September 11, 2019
- Categories: Rails 6, Rails

Rails 6 marks arrays of translations as trusted safe by using the \_html suffix

### Rails 6 adds filter_attributes on ActiveRecord::Base

[Rails 6 adds filter_attributes on ActiveRecord::Base](https://www.bigbinary.com/blog/rails-6-adds-activerecord-base-filter_attributes)

- Author: Amit Choudhary
- Published: September 3, 2019
- Categories: Rails 6, Rails

Rails 6 adds filter_attributes on ActiveRecord::Base

### ArgumentError for invalid:limit &:precision Rails 6

[ArgumentError for invalid:limit &:precision Rails 6](https://www.bigbinary.com/blog/rails-6-raises-argumenterror-for-invalid-limit-and-precision)

- Author: Amit Choudhary
- Published: August 27, 2019
- Categories: Rails 6, Rails

Rails 6 raises ArgumentError for invalid:limit and:precision

### Rails 6 Pass custom config to ActionCable::Server::Base

[Rails 6 Pass custom config to ActionCable::Server::Base](https://www.bigbinary.com/blog/rails-6-allows-passing-custom-configuration-to-actioncable-server-base)

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

Rails 6 allows passing custom configuration to ActionCable::Server::Base

### Rails 6 adds support of symbol keys

[Rails 6 adds support of symbol keys](https://www.bigbinary.com/blog/rails-6-adds-activesupport-hashwithindifferentaccess-assoc)

- Author: Amit Choudhary
- Published: August 20, 2019
- Categories: Rails 6, Rails

Rails 6 adds support of symbol keys with
ActiveSupport::HashWithIndifferentAccess#assoc

### Rails 6 preserves status of #html_safe?

[Rails 6 preserves status of #html_safe?](https://www.bigbinary.com/blog/rails-6-preserves-status-of-html_safe-on-sliced-and-multiplied-html-safe-strings)

- Author: Vishal Telangre
- Published: August 13, 2019
- Categories: Rails 6, Rails

"Rails 6 preserves status of #html_safe? on HTML safe strings which are sliced
or multiplied using \`ActiveSupport::SafeBuffer#\*\`"

### 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 6 deprecates where.not as NOR & Rails 6.1 as NAND

[Rails 6 deprecates where.not as NOR & Rails 6.1 as NAND](https://www.bigbinary.com/blog/rails-6-deprecates-where-not-working-as-nor-and-will-change-to-nand-in-rails-6-1)

- Author: Taha Husain
- Published: July 31, 2019
- Categories: Rails 6, Rails

Rails 6 adds a deprecation warning for where.not as NOR and will change in Rails
6.1 to NAND

### Rails 6 adds support for Optimizer Hints

[Rails 6 adds support for Optimizer Hints](https://www.bigbinary.com/blog/rails-6-supports-optimizer-hints)

- Author: Vishal Telangre
- Published: July 30, 2019
- Categories: Rails 6, Rails

Rails 6 has added support for Optimizer Hints

### Rails 6 reports object allocations while rendering

[Rails 6 reports object allocations while rendering](https://www.bigbinary.com/blog/rails-6-reports-object-allocations-made-while-rendering-view-templates)

- Author: Vishal Telangre
- Published: July 23, 2019
- Categories: Rails 6, Rails

Rails 6 reports object allocations made while rendering view templates

### Rails 6 adds ActiveRecord::Relation#annotate

[Rails 6 adds ActiveRecord::Relation#annotate](https://www.bigbinary.com/blog/rails-6-adds-annotate-to-activerecord-relation-queries)

- Author: Abhay Nikam
- Published: July 15, 2019
- Categories: Rails 6, Rails

Rails 6 adds ActiveRecord::Relation#annotate to annotate generated SQL queries

### Rails 6 adds hook to Active Job for retry & discard

[Rails 6 adds hook to Active Job for retry & discard](https://www.bigbinary.com/blog/rails-6-adds-hooks-to-activejob-around-retries-and-discards)

- Author: Vishal Telangre
- Published: July 9, 2019
- Categories: Rails 6, Rails

Rails 6 adds hooks to Active Job around retries and discards

### Rails 6 adds support for Multi Environment credentials

[Rails 6 adds support for Multi Environment credentials](https://www.bigbinary.com/blog/rails-6-adds-support-for-multi-environment-credentials)

- Author: Berin Larson
- Published: July 3, 2019
- Categories: Rails 6, Rails

Rails 6 adds support for multi environment credentials

### Rails 6 adds before? and after? to Date and Time

[Rails 6 adds before? and after? to Date and Time](https://www.bigbinary.com/blog/rails-6-adds-before-and-after-to-date-and-time)

- Author: Amit Choudhary
- Published: June 26, 2019
- Categories: Rails 6, Rails

Rails 6 adds before? and after? to Date, DateTime, Time and
ActiveSupport::TimeWithZone classes

### Rails 6 adds Array#extract!

[Rails 6 adds Array#extract!](https://www.bigbinary.com/blog/rails-6-adds-array-extract)

- Author: Amit Choudhary
- Published: June 24, 2019
- Categories: Rails 6, Rails

Rails 6 adds Array#extract!

### Rails 6 adds Enumerable#index_with

[Rails 6 adds Enumerable#index_with](https://www.bigbinary.com/blog/rails-6-adds-enumerable-index_with)

- Author: Amit Choudhary
- Published: June 17, 2019
- Categories: Rails 6, Rails

Rails 6 adds Enumerable#index_with

### Rails 6 adds private option to delegate method

[Rails 6 adds private option to delegate method](https://www.bigbinary.com/blog/rails-6-adds-private-option-to-delegate-method)

- Author: Amit Choudhary
- Published: June 10, 2019
- Categories: Rails 6, Rails

Rails 6 adds private option to delegate method

### Rails 6 allows spaces in postgres table names

[Rails 6 allows spaces in postgres table names](https://www.bigbinary.com/blog/rails-6-allows-spaces-in-postgres-table-names)

- Author: Amit Choudhary
- Published: June 5, 2019
- Categories: Rails 6, Rails

Rails 6 allows spaces in postgres table names

### Rails 6 adds if_not_exists option to create_table

[Rails 6 adds if_not_exists option to create_table](https://www.bigbinary.com/blog/rails-6-adds-if_not_exists-option-to-create_table)

- Author: Amit Choudhary
- Published: May 22, 2019
- Categories: Rails 6, Rails

Rails 6 adds if_not_exists option to create_table

### Rails 6 has added a way to change the database of the app

[Rails 6 has added a way to change the database of the app](https://www.bigbinary.com/blog/rails-6-has-added-a-way-to-change-the-database-of-the-app)

- Author: Prathamesh Sonpatki
- Published: April 30, 2019
- Categories: Rails 6, Rails

It is possible to change the database configuration using a simple command

### Rails 6 adds parallel testing

[Rails 6 adds parallel testing](https://www.bigbinary.com/blog/rails-6-adds-parallel-testing)

- Author: Amit Choudhary
- Published: April 29, 2019
- Categories: Rails 6, Rails

Rails 6 adds parallel testing

### Rails 6 improves ActiveSupport::Notifications::Event

[Rails 6 improves ActiveSupport::Notifications::Event](https://www.bigbinary.com/blog/rails-6-adds-cpu-time-idle-time-and-allocations-to-activesupport-notifications-event)

- Author: Vishal Telangre
- Published: April 24, 2019
- Categories: Rails 6, Rails

Rails 6 adds CPU time, idle time and allocations to
ActiveSupport::Notifications::Event

### Rails 6 allows configuring has_secure_password attribute

[Rails 6 allows configuring has_secure_password attribute](https://www.bigbinary.com/blog/rails-6-allows-configurable-attribute-name-on-has_secure_password)

- Author: Amit Choudhary
- Published: April 23, 2019
- Categories: Rails 6, Rails

Rails 6 allows configurable attribute name on has_secure_password

### Rails 6 allows overriding ActiveModel::Errors#full_message

[Rails 6 allows overriding ActiveModel::Errors#full_message](https://www.bigbinary.com/blog/rails-6-allows-to-override-the-activemodel-errors-full_message-format-at-the-model-level-and-at-the-attribute-level)

- Author: Vishal Telangre
- Published: April 22, 2019
- Categories: Rails 6, Rails

Rails 6 allows to override the ActiveModel::Errors#full_message format at the
model level and at the attribute level

### Rails 6 adds ActiveRecord::Relation#extract_associated

[Rails 6 adds ActiveRecord::Relation#extract_associated](https://www.bigbinary.com/blog/rails-6-adds-activerecord-relation-extract_associated)

- Author: Taha Husain
- Published: April 17, 2019
- Categories: Rails 6, Rails

Rails 6 added ActiveRecord::Relation#extract_associated for extracting
associated records from a relation

### Rails 6 adds implicit_order_column

[Rails 6 adds implicit_order_column](https://www.bigbinary.com/blog/rails-6-adds-implicit_order_column)

- Author: Amit Choudhary
- Published: April 16, 2019
- Categories: Rails 6, Rails

Rails 6 adds implicit_order_column for ordering records implicitly

### Bulk insert support in Rails 6

[Bulk insert support in Rails 6](https://www.bigbinary.com/blog/bulk-insert-support-in-rails-6)

- Author: Vishal Telangre
- Published: April 15, 2019
- Categories: Rails 6, Rails

Rails 6 introduced methods such as insert_all, insert_all! and update_all to
support bulk insert

### Rails 6 drops support for PostgreSQL version less than 9.3

[Rails 6 drops support for PostgreSQL version less than 9.3](https://www.bigbinary.com/blog/rails-6-drops-support-for-postgresql-less-than-9-3)

- Author: Prathamesh Sonpatki
- Published: April 10, 2019
- Categories: Rails 6, Rails

Rails 6 has dropped support for PostgreSQL versions less than 9.3

### Rails 6 requires Ruby 2.5 or newer

[Rails 6 requires Ruby 2.5 or newer](https://www.bigbinary.com/blog/rails-6-requires-ruby-2-5-or-newer)

- Author: Vishal Telangre
- Published: April 9, 2019
- Categories: Rails 6, Rails

Rails 6 requires Ruby 2.5 or newer

### Rails 6 database seed uses inline Active Job adapter

[Rails 6 database seed uses inline Active Job adapter](https://www.bigbinary.com/blog/database-seeding-task-uses-inline-active-job-adapter-in-rails-6)

- Author: Prathamesh Sonpatki
- Published: April 3, 2019
- Categories: Rails 6, Rails

Rails 6 uses inline Active Job adapter for background processing related to
db:seed task

### Rails 6 adds ActiveRecord::Relation#reselect

[Rails 6 adds ActiveRecord::Relation#reselect](https://www.bigbinary.com/blog/rails-6-adds-activerecord-relation-reselect)

- Author: Abhay Nikam
- Published: April 2, 2019
- Categories: Rails 6, Rails

Rails 6 adds ActiveRecord::Relation#reselect method.

### Rails 6 adds ActiveModel::Errors#of_kind?

[Rails 6 adds ActiveModel::Errors#of_kind?](https://www.bigbinary.com/blog/rails-6-adds-activemodel-errors-of_kind-)

- Author: Amit Choudhary
- Published: April 1, 2019
- Categories: Rails 6, Rails

Rails 6 adds ActiveModel::Errors#of_kind?

### Rails 6 shows routes in expanded format

[Rails 6 shows routes in expanded format](https://www.bigbinary.com/blog/rails-6-shows-routes-in-expanded-format)

- Author: Prathamesh Sonpatki
- Published: March 27, 2019
- Categories: Rails 6, Rails

Rails 6 has added ability to show the routes in an expanded format

### Rails 6 adds ActiveModel::Errors#slice!

[Rails 6 adds ActiveModel::Errors#slice!](https://www.bigbinary.com/blog/rails-6-adds-activemodel-errors-slice)

- Author: Amit Choudhary
- Published: March 26, 2019
- Categories: Rails 6, Rails

Rails 6 adds ActiveModel::Errors#slice!

### Rails 6 adds create_or_find_by and create_or_find_by!

[Rails 6 adds create_or_find_by and create_or_find_by!](https://www.bigbinary.com/blog/rails-6-adds-create_or_find_by)

- Author: Amit Choudhary
- Published: March 25, 2019
- Categories: Rails 6, Rails

Rails 6 adds create_or_find_by and create_or_find_by! to find record if creation
fails because of unique constraints

### Rails 6 raises ActiveModel::MissingAttributeError

[Rails 6 raises ActiveModel::MissingAttributeError](https://www.bigbinary.com/blog/rails-6-raises-activemodel-missingattributeerror-when-update_columns-is-used-with-non-existing-attribute)

- Author: Amit Choudhary
- Published: March 20, 2019
- Categories: Rails 6, Rails

updated_columns raises ActiveModel::MissingAttributeError when used with a
non-existing attribute in Rails 6

### Rails 6 ActiveRecord::Base.configurations

[Rails 6 ActiveRecord::Base.configurations](https://www.bigbinary.com/blog/rails-6-changed-activerecord-base-configurations-result-to-an-object)

- Author: Amit Choudhary
- Published: March 19, 2019
- Categories: Rails 6, Rails

Rails 6 changed ActiveRecord::Base.configurations result to an object instead of
a hash

### Rails 6 shows unpermitted params in logs in color

[Rails 6 shows unpermitted params in logs in color](https://www.bigbinary.com/blog/rails-6-shows-unpermitted-params-in-logs-in-color)

- Author: Prathamesh Sonpatki
- Published: March 18, 2019
- Categories: Rails 6, Rails

The unpermitted params are shown in red color for better visibility

### Rails 6 delete_by, destroy_by ActiveRecord::Relation

[Rails 6 delete_by, destroy_by ActiveRecord::Relation](https://www.bigbinary.com/blog/rails-6-adds-activerecord-relation-delete_by-and-activerecord-relation-destroy_by)

- Author: Abhay Nikam
- Published: March 13, 2019
- Categories: Rails 6, Rails

In Rails 6, ActiveRecord::Relation has two new methods \`delete_by\` and
\`destroy_by\`.

### Rails 6 adds ActiveRecord::Relation#touch_all

[Rails 6 adds ActiveRecord::Relation#touch_all](https://www.bigbinary.com/blog/rails-6-adds-activerecord-relation-touch-all)

- Author: Amit Choudhary
- Published: March 12, 2019
- Categories: Rails 6, Rails

Rails 6 added pick method on ActiveRecord::Relation#touch_all to touch multiple
records in a go

### Rails 6 adds negative scopes on enum

[Rails 6 adds negative scopes on enum](https://www.bigbinary.com/blog/rails-6-adds-negative-scopes-on-enum)

- Author: Abhay Nikam
- Published: March 6, 2019
- Categories: Rails 6, Rails

Rails 6 adds default negative scopes for all defined enum on model

### Replacing PhantomJS with headless Chrome

[Replacing PhantomJS with headless Chrome](https://www.bigbinary.com/blog/replacing-phantomjs-with-headless-chrome)

- Author: Navaneeth PK
- Published: January 22, 2019
- Categories: Rails

Replacing PhantomJS with headless Chrome

### Rails 5 Active Record attributes API

[Rails 5 Active Record attributes API](https://www.bigbinary.com/blog/rails-5-attributes-api)

- Author: Abhay Nikam
- Published: December 11, 2018
- Categories: Rails 5, Rails

Rails 5 introduces Active Record attributes API to type cast values to
appropriate Ruby types

### Passing current_user by default in Sidekiq

[Passing current_user by default in Sidekiq](https://www.bigbinary.com/blog/passing-current-user-by-default-in-sidekiq)

- Author: Ashish Gaur
- Published: December 5, 2018
- Categories: Rails

Passing current_user by default in Sidekiq

### Skipping devise trackable module for API calls

[Skipping devise trackable module for API calls](https://www.bigbinary.com/blog/skip-devise-trackable-module-for-api-calls)

- Author: Prathamesh Sonpatki
- Published: October 30, 2018
- Categories: Rails

This blog post discusses about issues faced due to devise trackable module for
API calls and how to skip it

### 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

### Use parametrized containers to deploy Rails microservices

[Use parametrized containers to deploy Rails microservices](https://www.bigbinary.com/blog/deploying-rails-applications-with-parmaetrized-containers)

- Author: Rahul Mahale
- Published: September 26, 2018
- Categories: Kubernetes, Rails

Using parametrized containers to deploy micro services in Rails applications

### Upload direct to S3 with Pre-signed POST request

[Upload direct to S3 with Pre-signed POST request](https://www.bigbinary.com/blog/uploading-files-directly-to-s3-using-pre-signed-post-request)

- Author: Chirag Shah
- Published: September 4, 2018
- Categories: Rails

Pre-signed POST request allows for securely uploading large files directly to S3
via a signed expirable url, bypassing the 30 seconds Heroku time limit

### Setting up a high performance Geocoder

[Setting up a high performance Geocoder](https://www.bigbinary.com/blog/setting-up-a-high-performance-geocoder)

- Author: Midhun Krishna
- Published: August 21, 2018
- Categories: Ruby, Rails

A setup guide with side-by-side comparison of Nominatim with Google geocoder and
how to improve geocoding efficiency

### Speed up Docker image build process of a Rails app

[Speed up Docker image build process of a Rails app](https://www.bigbinary.com/blog/speeding-up-docker-image-build-process-of-a-rails-application)

- Author: Vishal Telangre
- Published: July 25, 2018
- Categories: Rails, Kubernetes

By reusing bundler cache and cache of precompiled assets, we can speed up Docker
image building process of a Rails application.

### 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

### Using Concurrent Ruby in a Ruby on Rails Application

[Using Concurrent Ruby in a Ruby on Rails Application](https://www.bigbinary.com/blog/using-concurrent-ruby-in-a-ruby-on-rails-application)

- Author: Midhun Krishna
- Published: June 5, 2018
- Categories: Ruby, Rails

A pratical use case of using Concurrent Ruby in Rails applications without
swalloing the exceptions

### 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

### Faster JSON generation using PostgreSQL JSON function

[Faster JSON generation using PostgreSQL JSON function](https://www.bigbinary.com/blog/generating-json-using-postgresql-json-function)

- Author: Chirag Shah
- Published: May 29, 2018
- Categories: Rails

PostgreSQL 9.2 and above has inbuilt support for JSON generation which can be
used for faster JSON generation

### 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

### How to mitigate DDoS using Rack::Attack

[How to mitigate DDoS using Rack::Attack](https://www.bigbinary.com/blog/how-to-mitigate-ddos-using-rack-attack)

- Author: Ershad Kunnakkadan
- Published: May 15, 2018
- Categories: Rails

Throttle requests based on IP with Rack::Attack

### Increase reliability using super_fetch of Sidekiq Pro

[Increase reliability using super_fetch of Sidekiq Pro](https://www.bigbinary.com/blog/increase-reliability-of-background-job-processing-using-super_fetch-of-sidekiq-pro)

- Author: Vishal Telangre
- Published: May 8, 2018
- Categories: Ruby, Rails, Kubernetes

Increase reliability of background job processing using super_fetch of Sidekiq
Pro

### 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.

### Gpg decryption without pin entry pop up using GPGME

[Gpg decryption without pin entry pop up using GPGME](https://www.bigbinary.com/blog/gpg-decryption-without-pin-entry-pop-up-using-gpgme)

- Author: Sushant Mittal
- Published: March 27, 2018
- Categories: Rails

Gpg decryption without pin entry pop up using GPGME

### Path based routing for Rails with HAProxy Ingress

[Path based routing for Rails with HAProxy Ingress](https://www.bigbinary.com/blog/using-haproxy-ingress-with-rails-uniconrn-and-websockets)

- Author: Rahul Mahale
- Published: February 28, 2018
- Categories: Kubernetes, Rails

Deploying Ruby on Rails application using HAProxy Ingress with unicorn/puma and
websockets on Kubernetes.

### 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.1 stops loading all records on Model.all#inspect

[Rails 5.1 stops loading all records on Model.all#inspect](https://www.bigbinary.com/blog/do-no-load-all-records-on-activerecord-relation-inspect)

- Author: Mohit Natoo
- Published: November 14, 2017
- Categories: Rails 5.1, Rails

Rails 5.1 limits number of records while calling inspect on
ActiveRecord::Relation object.

### Rails adds accurate numerical validation

[Rails adds accurate numerical validation](https://www.bigbinary.com/blog/rails-now-avoids-converting-integer-as-a-string-into-float-when-validating-numericality)

- Author: Sushant Mittal
- Published: October 23, 2017
- Categories: Rails

Rails now avoids converting integer as a string into float when validating
numericality

### Integrate SAML with many IDPs with Devise & OmniAuth

[Integrate SAML with many IDPs with Devise & OmniAuth](https://www.bigbinary.com/blog/saml-integration-with-multiple-idps-using-devise-omniauth)

- Author: Vijay Kumar Agrawal
- Published: October 11, 2017
- Categories: Rails

How to enable SSO using SAML service provider for multiple IDPs

### 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

### New Syntax for HTML Tag helpers in Rails 5.1

[New Syntax for HTML Tag helpers in Rails 5.1](https://www.bigbinary.com/blog/new-syntax-for-tag-helpers-in-rails-5-1)

- Author: Prathamesh Sonpatki
- Published: August 23, 2017
- Categories: Rails 5.1, Rails

Rails 5.1 introduces new shorter syntax for HTML tag helpers

### Rails 5.1 enhances ActiveSupport::TimeZone.country_zones

[Rails 5.1 enhances ActiveSupport::TimeZone.country_zones](https://www.bigbinary.com/blog/rails-5-1-returns-unmapped-timezones-from-activesupport-timezone-country_zones)

- Author: Narendra Rajput
- Published: July 18, 2017
- Categories: Rails 5.1, Rails

Rails 5.1 now returns unmapped timezones from
ActiveSupport::TimeZone.country_zones with supplied TZInfo identifier instead of
empty response

### Rails 5.1 dropped jQuery dependency in default stack

[Rails 5.1 dropped jQuery dependency in default stack](https://www.bigbinary.com/blog/rails-5-1-has-dropped-dependency-on-jquery-from-the-default-stack)

- Author: Neeraj Singh
- Published: June 20, 2017
- Categories: Rails 5.1, Rails

jQuery dropped as a dependency from Rails 5.1 onwards and replaced by a vanilla
rails-ujs driver for the unobtrusive JavaScript helpers

### Rails using db:migrate & db:seed on Kubernetes

[Rails using db:migrate & db:seed on Kubernetes](https://www.bigbinary.com/blog/managing-rails-tasks-such-as-db-migrate-and-db-seed-on-kuberenetes-while-performing-rolling-deployments)

- Author: Vishal Telangre
- Published: June 16, 2017
- Categories: Kubernetes, Rails

Managing Rails tasks such as 'db:migrate' and 'db:seed' on Kubernetes while
performing rolling deployments

### Rails 5.1 adds delegate_missing_to

[Rails 5.1 adds delegate_missing_to](https://www.bigbinary.com/blog/rails-5-1-adds-delegate-missing-to)

- Author: Neeraj Singh
- Published: May 30, 2017
- Categories: Rails 5.1, Rails

Rails 5.1 has introduced \`Module#delegate_missing_to\` to keep decorators more
clearer

### Rails 5.1 adds support for limit in batch processing

[Rails 5.1 adds support for limit in batch processing](https://www.bigbinary.com/blog/rails-5-1-adds-support-for-limit-in-batch-processing)

- Author: Mohit Natoo
- Published: May 23, 2017
- Categories: Rails 5.1, Rails

Rails 5.1 can now limit the number of records fetched for batch processing.

### Rails 5.1 doesn't share thread_mattr_accessor variable

[Rails 5.1 doesn't share thread_mattr_accessor variable](https://www.bigbinary.com/blog/rails-5-1-does-not-share-thread-mattr-accessor-variable-with-sub-class)

- Author: Mohit Natoo
- Published: May 16, 2017
- Categories: Rails 5.1, Rails

Rails 5.1 now does not share the variable defined by thread_mattr_accessor with
subclass.

### Rails 5.1 introduced assert_changes and assert_no_changes

[Rails 5.1 introduced assert_changes and assert_no_changes](https://www.bigbinary.com/blog/rails-5-1-introduced-assert_changes-and-assert_no_changes)

- Author: Narendra Rajput
- Published: May 9, 2017
- Categories: Rails 5.1, Rails

The BigBinary team's lesson on introduced assert_changes and assert_no_changes
in Rails 5.1

### Forward ActiveRecord::Relation#count to Enumerable#count

[Forward ActiveRecord::Relation#count to Enumerable#count](https://www.bigbinary.com/blog/forwarding-active-record-relation-count-to-enumerable-count)

- Author: Rohit Arolkar
- Published: May 1, 2017
- Categories: Rails 5.1, Rails

Forward ActiveRecord::Relation#count to Enumerable#count if block given

### Rails 5.1 has introduced Date#all_day helper

[Rails 5.1 has introduced Date#all_day helper](https://www.bigbinary.com/blog/rails-5-1-has-introduced-date-all_day-helper)

- Author: Prathamesh Sonpatki
- Published: April 24, 2017
- Categories: Rails 5.1, Rails

Rails 5.1 has introduced a helper method for creating a range object covering
the whole day for given date

### Rails 5 blogs and the art of story telling

[Rails 5 blogs and the art of story telling](https://www.bigbinary.com/blog/rails-5-blogs-and-the-art-of-story-telling)

- Author: Neeraj Singh
- Published: September 19, 2016
- Categories: Misc, Rails

Rails 5 blogs and the art of story telling

### Rails 5 Create module and class level variables

[Rails 5 Create module and class level variables](https://www.bigbinary.com/blog/rails-5-adds-ability-to-create-module-and-class-level-variables-on-per-thread-basis)

- Author: Abhishek Jain
- Published: September 5, 2016
- Categories: Rails 5, Rails

In Rails 5, we can create specific class and module variables that live for the
lifetime of a thread

### Rails 5 silences assets logs in dev mode by default

[Rails 5 silences assets logs in dev mode by default](https://www.bigbinary.com/blog/rails-5-silences-assets-logs-in-development-mode-by-default)

- Author: Midhun Krishna
- Published: September 2, 2016
- Categories: Rails 5, Rails

quiet_assets gem used for silencing logging of assets in the development mode is
now part of Rails 5

### Rails 5 disables autoloading while app in production

[Rails 5 disables autoloading while app in production](https://www.bigbinary.com/blog/rails-5-disables-autoloading-after-booting-the-app-in-production)

- Author: Shailesh Kalamkar
- Published: August 29, 2016
- Categories: Rails 5, Rails

In Rails 5 autoloading is disbaled after booting the app in production mode by
default

### Rails 5 adds more control to fine tuning SSL usage

[Rails 5 adds more control to fine tuning SSL usage](https://www.bigbinary.com/blog/rails-5-adds-more-control-to-fine-tuning-ssl-usage)

- Author: Srihari K
- Published: August 24, 2016
- Categories: Rails 5, Rails

Rails 5 gives finer control over HSTS header and has cleaned up options for
using SSL

### Rails 5 Discard some flash messages to trim storage

[Rails 5 Discard some flash messages to trim storage](https://www.bigbinary.com/blog/rails-5-trims-session-storage-by-discarding-some-flash-messages)

- Author: Abhishek Jain
- Published: August 23, 2016
- Categories: Rails 5, Rails

Rails 5 trims down session storage by removing discarded flash messages before
persisting into the session

### Rails 5 deprecates alias_method_chain

[Rails 5 deprecates alias_method_chain](https://www.bigbinary.com/blog/rails-5-deprecates-alias-method-chain)

- Author: Neeraj Singh
- Published: August 21, 2016
- Categories: Rails 5, Rails

Rails 5 deprecates alias_method_chain in favor of Ruby's builtin method.

### New framework defaults in Rails 5 to make upgrade easier

[New framework defaults in Rails 5 to make upgrade easier](https://www.bigbinary.com/blog/new-framework-defaults-in-rails-5-to-make-upgrade-easier)

- Author: Srihari K
- Published: August 18, 2016
- Categories: Rails 5, Rails

Rails 5 adds feature flags for all the breaking changes to make upgrade process
easier

### Rails 5 Wildcard for specifying template dependencies

[Rails 5 Wildcard for specifying template dependencies](https://www.bigbinary.com/blog/rails-5-allows-wildcard-for-specifying-template-dependencies)

- Author: Abhishek Jain
- Published: August 17, 2016
- Categories: Rails 5, Rails

We can now use wildcard for adding all template dependencies from a directory
rather than adding files one by one for cache digests

### Rails 5 Passing records to fresh_when and stale?

[Rails 5 Passing records to fresh_when and stale?](https://www.bigbinary.com/blog/rails-5-supports-passing-collection-of-records-to-fresh_when-and-stale)

- Author: Ershad Kunnakkadan
- Published: August 16, 2016
- Categories: Rails 5, Rails

Rails 5 adds support to pass collection of records to fresh_when and stale? for
improved caching

### Set model name in fixtures as metadata

[Set model name in fixtures as metadata](https://www.bigbinary.com/blog/set-model-name-in-fixtures-as-metadata)

- Author: Srihari K
- Published: August 9, 2016
- Categories: Rails 5, Rails

In Rails 5 model name can be set as metadata in the fixture file, rather than
being infered from the fixture filename.

### ActionController::Parameters in Rails 5

[ActionController::Parameters in Rails 5](https://www.bigbinary.com/blog/parameters-no-longer-inherit-from-hash-with-indifferent-access-in-rails-5)

- Author: Rohit Arolkar
- Published: July 25, 2016
- Categories: Rails 5, Rails

ActionController::Parameters will throw deprecation warnings if we treat
ActionController::Parameters as hash.

### Rails 5 solves ambiguous column issue

[Rails 5 solves ambiguous column issue](https://www.bigbinary.com/blog/rails-5-fixes-ambiguous-cloumn-name-for-projected-fields-in-group-by-query)

- Author: Abhishek Jain
- Published: July 21, 2016
- Categories: Rails 5, Rails

We now don't have to provide a table name in quoted string for fetching fields
which are present in join table as well when used with group by clause

### Rails 5 Expression Indexes & Operator Classes support

[Rails 5 Expression Indexes & Operator Classes support](https://www.bigbinary.com/blog/rails-5-adds-support-for-expression-indexes-for-postgresql)

- Author: Midhun Krishna
- Published: July 20, 2016
- Categories: Rails 5, Rails

Active Record index creation api support adding expression indexes

### Attach arbitrary metadata to an Active Job in Rails 5

[Attach arbitrary metadata to an Active Job in Rails 5](https://www.bigbinary.com/blog/attach-arbitrary-metadata-to-an-active-job-in-rails-5)

- Author: Midhun Krishna
- Published: July 18, 2016
- Categories: Rails 5, Rails

We can add arbitrary metadata to Active Job while it is serialized and read it
back when the job is performed in Rails 5

### Partial template name without Ruby identifier Rails 5

[Partial template name without Ruby identifier Rails 5](https://www.bigbinary.com/blog/rails-5-partial-template-name-need-not-be-a-valid-ruby-identifier)

- Author: Prajakta Tambe
- Published: July 14, 2016
- Categories: Rails 5, Rails

Partial template can have any name which starts with underscore in Rails 5

### Rails 5 Passing current record for custom error

[Rails 5 Passing current record for custom error](https://www.bigbinary.com/blog/rails-5-allows-passing-record-to-error-message-generator)

- Author: Hitesh Rawal
- Published: July 13, 2016
- Categories: Rails 5, Rails

We can now pass the validated record to the proc for generating a custom error
message.

### Skip mailers while generating Rails 5 app

[Skip mailers while generating Rails 5 app](https://www.bigbinary.com/blog/skip-mailers-while-generating-rails-5-app)

- Author: Abhishek Jain
- Published: July 8, 2016
- Categories: Rails 5, Rails

We can skip adding mailers and its configuration when generating Rails 5 app

### Errors can be indexed with nested attributes in Rails 5

[Errors can be indexed with nested attributes in Rails 5](https://www.bigbinary.com/blog/errors-can-be-indexed-with-nested-attrbutes-in-rails-5)

- Author: Abhishek Jain
- Published: July 7, 2016
- Categories: Rails 5, Rails

We can now opt to index errors on nested attributes in Rails 5

### Rails 5 Conversion when deep munging params

[Rails 5 Conversion when deep munging params](https://www.bigbinary.com/blog/rails-5-does-not-convert-blank-array-to-nil-in-deep-munging)

- Author: Mohit Natoo
- Published: July 6, 2016
- Categories: Rails 5, Rails

Rails 5 persists with the empty are in deep munging and does not convert it to
nil.

### Specific mime types in controller tests in Rails 5

[Specific mime types in controller tests in Rails 5](https://www.bigbinary.com/blog/use-as-option-to-encode-request-with-specific-mime-type-in-rails-5)

- Author: Abhishek Jain
- Published: July 5, 2016
- Categories: Rails 5, Rails

We can provide a specific mime type to a request using \`as\` option in Rails 5

### Default response with 204 No Content in Rails 5

[Default response with 204 No Content in Rails 5](https://www.bigbinary.com/blog/controller-actions-default-no-content-in-rails-5-if-template-is-missing)

- Author: Abhishek Jain
- Published: July 3, 2016
- Categories: Rails 5, Rails

Controller actions will now render 204 No Content when we don't tell Rails how
to generate response

### Rails 5 ensures compatibility with Rack frameworks

[Rails 5 ensures compatibility with Rack frameworks](https://www.bigbinary.com/blog/rails-5-ensures-compatibility-between-action-dispatch-session-and-rack-session)

- Author: Mohit Natoo
- Published: June 30, 2016
- Categories: Rails 5, Rails

Rails 5 introduces \`each\` method in ActionDispatch::Request::Session to ensure
compatibility between Rails and other Rack frameworks.

### Rails 5 supports logging errors with tagged logging

[Rails 5 supports logging errors with tagged logging](https://www.bigbinary.com/blog/rails-5-supports-logging-errors-with-tagged-logging)

- Author: Sharang Dashputre
- Published: June 28, 2016
- Categories: Rails 5, Rails

Rails 5 now generates the application log with log tags applied to errors as
well

### Rails 5 makes sql statements even more colorful

[Rails 5 makes sql statements even more colorful](https://www.bigbinary.com/blog/rails-5-makes-sql-statements-even-more-colorful)

- Author: Abhishek Jain
- Published: June 27, 2016
- Categories: Rails 5, Rails

This new coloration approach makes it easier to scan the rails console for
specific types of SQL activity

### Rails 5 adds helpers method in controllers for ease

[Rails 5 adds helpers method in controllers for ease](https://www.bigbinary.com/blog/rails-add-helpers-method-to-ease-usage-of-helper-modules-in-controllers)

- Author: Abhishek Jain
- Published: June 26, 2016
- Categories: Rails 5, Rails

We can now use helpers method to call helper methods in controller

### Rails 5 supports adding comments in migrations

[Rails 5 supports adding comments in migrations](https://www.bigbinary.com/blog/rails-5-supports-adding-comments-migrations)

- Author: Prajakta Tambe
- Published: June 21, 2016
- Categories: Rails 5, Rails

Rails 5 adds support for database schema comments for tables, columns and
indexes for PostgreSQL and MySQL

### Rails 5 allows UUID as column type in create_join_table

[Rails 5 allows UUID as column type in create_join_table](https://www.bigbinary.com/blog/rails-5-create-join-table-with-uuid)

- Author: Hitesh Rawal
- Published: June 16, 2016
- Categories: Rails 5, Rails

Rails 5 started supporting UUID as a column type in create_join_table.

### Rails 5 adds another base class Application Job for jobs

[Rails 5 adds another base class Application Job for jobs](https://www.bigbinary.com/blog/rails-5-adds-application-jobs-for-jobs)

- Author: Hitesh Rawal
- Published: June 12, 2016
- Categories: Rails 5, Rails

Rails 5 adds explicit base class ApplicationJob for ActiveJob.

### Rails 5 Updating records in AR Relation

[Rails 5 Updating records in AR Relation](https://www.bigbinary.com/blog/rails-5-allows-updating-relation-objects-along-with-callbacks-and-validations)

- Author: Mohit Natoo
- Published: June 10, 2016
- Categories: Rails 5, Rails

Rails 5 modified the ActiveRecord::Relation#update method to now support update
on the relation. It also runs callbacks and validations on the records.

### Rails 5 prevents destructive action on production database

[Rails 5 prevents destructive action on production database](https://www.bigbinary.com/blog/rails-5-prevents-destructive-action-on-production-db)

- Author: Hitesh Rawal
- Published: June 7, 2016
- Categories: Rails 5, Rails

Rails 5 prevents destructive action on production database by keeping
environment version to internal metadata.

### Rails 5 adds finish option in find_in_batches

[Rails 5 adds finish option in find_in_batches](https://www.bigbinary.com/blog/rails-5-provides-finish-option-for-find-in-batches)

- Author: Mohit Natoo
- Published: June 6, 2016
- Categories: Rails 5, Rails

Rails 5 has an option to provide end value in find_in_batches method

### Rails 5 introduces country_zones helper method

[Rails 5 introduces country_zones helper method](https://www.bigbinary.com/blog/rails-5-introduces-helpers-for-country-zones)

- Author: Mohit Natoo
- Published: June 1, 2016
- Categories: Rails 5, Rails

Rails 5 now allows to fetch information about all the timezones in a particular
country by introductin of a new helper method.

### Rails 5 provides fragment caching in Action Mailer views

[Rails 5 provides fragment caching in Action Mailer views](https://www.bigbinary.com/blog/rails-5-provides-fragment-caching-in-action-mailer-view)

- Author: Prajakta Tambe
- Published: May 31, 2016
- Categories: Rails 5, Rails

Templates in rails 5 can use fragment cache like Action View templates

### Rails 5 adds OR support in Active Record

[Rails 5 adds OR support in Active Record](https://www.bigbinary.com/blog/rails-5-adds-or-support-in-active-record)

- Author: Abhishek Jain
- Published: May 30, 2016
- Categories: Rails 5, Rails

We will now be able to perform OR operation in Active Record without having to
write custom SQL.

### Rails 5 ArrayInquirer and checking array contents

[Rails 5 ArrayInquirer and checking array contents](https://www.bigbinary.com/blog/rails-5-introduces-active-support-array-inquirer)

- Author: Mohit Natoo
- Published: May 27, 2016
- Categories: Rails 5, Rails

Rails 5 has wrapped Array in an ArrayInquirer giving us a friendlier way to
check its contents. This post also explains its usage in request variants.

### Rails 5 Renaming transactional fixtures to tests

[Rails 5 Renaming transactional fixtures to tests](https://www.bigbinary.com/blog/rails-5-renamed-transactional-fixtures-to-transactional-tests)

- Author: Mohit Natoo
- Published: May 26, 2016
- Categories: Rails 5, Rails

Rails 5 renamed use_transactional_fixtures method to use_transactional_tests.
This was to make it clear that its functionality has nothing to do with use of
fixtures.

### Rails 5 adds ignored_columns for Active Record

[Rails 5 adds ignored_columns for Active Record](https://www.bigbinary.com/blog/rails-5-adds-active-record-ignored-columns)

- Author: Hitesh Rawal
- Published: May 24, 2016
- Categories: Rails 5, Rails

Rails 5 has implemented ignored_columns method for active record.

### Rails 5 adds a hidden field on collection radio buttons

[Rails 5 adds a hidden field on collection radio buttons](https://www.bigbinary.com/blog/rails-5-add-a-hidden-field-on-collection-radio-buttons)

- Author: Prajakta Tambe
- Published: May 18, 2016
- Categories: Rails 5, Rails

Rails 5 adds a hidden field on collection radio buttons to handle situation when
user submits a form without selecting any radio button.

### Rails 5 Attributes from Active Record to Active Model

[Rails 5 Attributes from Active Record to Active Model](https://www.bigbinary.com/blog/rails-5-moved-assign-attributes-from-activerecord-to-activemodel)

- Author: Mohit Natoo
- Published: May 17, 2016
- Categories: Rails 5, Rails

In Rails 5 we can use attribute assignment outside of Active Record inherited
classes

### Rails 5 Configure Active Job backend adapter for jobs

[Rails 5 Configure Active Job backend adapter for jobs](https://www.bigbinary.com/blog/rails-5-allows-to-inherit-activejob-queue-adapter)

- Author: Mohit Natoo
- Published: May 15, 2016
- Categories: Rails 5, Rails

Rails 5 provides support to configure queue_adapter at job level and this
queue_adapter can be inherited by child jobs.

### Rails 5 accepts 1 or true for acceptance validation

[Rails 5 accepts 1 or true for acceptance validation](https://www.bigbinary.com/blog/rails-5-accepts-1-or-true-for-acceptance-validation)

- Author: Mohit Natoo
- Published: May 13, 2016
- Categories: Rails 5, Rails

Rails 5 now allows accepting true in acceptance validation. Previously only "1"
was accepted in acceptance validation.

### Rails 5 supports bi-directional destroy dependency

[Rails 5 supports bi-directional destroy dependency](https://www.bigbinary.com/blog/Rails-5-supports-bi-directional-destroy-dependency)

- Author: Abhishek Jain
- Published: May 12, 2016
- Categories: Rails 5, Rails

We can now add bi-directional destroy dependency on Rails associations

### Rails 5 adds after_commit callbacks aliases

[Rails 5 adds after_commit callbacks aliases](https://www.bigbinary.com/blog/rails-5-adds-after_create-aliases)

- Author: Hitesh Rawal
- Published: May 11, 2016
- Categories: Rails 5, Rails

Rails 5 Introduces after\_{create,update,delete}\_commit callbacks as aliases
for after_commit.

### Rails 5 Updating a record without updating timestamps

[Rails 5 Updating a record without updating timestamps](https://www.bigbinary.com/blog/rails-5-allows-updating-without-updating-timestamps)

- Author: Abhishek Jain
- Published: May 9, 2016
- Categories: Rails 5, Rails

We can save a record without updating timestamps in Rails 5

### Rails 5 Retrieving info of failed validations

[Rails 5 Retrieving info of failed validations](https://www.bigbinary.com/blog/rails-5-adds-a-way-to-get-information-about-types-of-failed-validations)

- Author: Abhishek Jain
- Published: May 3, 2016
- Categories: Rails 5, Rails

Rails 5 makes it possible to return information about failed validator types
instead of just returning translated error messages as before

### Rails 5 - What's in it for me?

[Rails 5 - What's in it for me?](https://www.bigbinary.com/blog/rails-5-webinar)

- Author: Prathamesh Sonpatki
- Published: April 22, 2016
- Categories: Rails 5, Rails

Learn more about upcoming changes in Rails 5 release

### Rails 5 officially supports MariaDB

[Rails 5 officially supports MariaDB](https://www.bigbinary.com/blog/rails-5-official-supports-mariadb)

- Author: Vipul
- Published: April 21, 2016
- Categories: Rails 5, Rails

Rails 5 officially supports MariaDB

### Changes to test controllers in Rails 5

[Changes to test controllers in Rails 5](https://www.bigbinary.com/blog/changes-to-test-controllers-in-rails-5)

- Author: Abhishek Jain
- Published: April 19, 2016
- Categories: Rails 5, Rails

Deprecation of assigns and assert_template in controller tests and usage of
keyword arguments in HTTP methods

### accessed_fields to find active fields in application

[accessed_fields to find active fields in application](https://www.bigbinary.com/blog/accesssed-fields-to-find-actually-used-fileds-in-Rails-5)

- Author: Abhishek Jain
- Published: April 18, 2016
- Categories: Rails 5, Rails

Rails 5 introduces accessed_fields method to determine all the fields that were
accessed on a model while performing some operation

### Rails 5 Warning when fetching with Active Record

[Rails 5 Warning when fetching with Active Record](https://www.bigbinary.com/blog/rails-5-adds-option-to-log-warning-when-fetching-big-result-sets)

- Author: Abhishek Jain
- Published: April 13, 2016
- Categories: Rails 5, Rails

We can now log warning when Active Record tries to fetch the result set greater
than configured limit

### Rails 5 Sending STDOUT via environment variable

[Rails 5 Sending STDOUT via environment variable](https://www.bigbinary.com/blog/rails-5-allows-to-send-log-to-stdout-via-environment-variable)

- Author: Mohit Natoo
- Published: April 12, 2016
- Categories: Rails 5, Rails

Rails 5 has introduced an environment variable, with the help of which logs can
now be directed to STDOUT in production environment.

### Validate multiple contexts together in Rails 5

[Validate multiple contexts together in Rails 5](https://www.bigbinary.com/blog/validate-multiple-contexts-in-rails-5)

- Author: Vijay Kumar Agrawal
- Published: April 8, 2016
- Categories: Rails 5, Rails

Rails 5 enhancement to validate a model on multiple contexts at once

### Rails 5 changes protect_from_forgery execution order

[Rails 5 changes protect_from_forgery execution order](https://www.bigbinary.com/blog/rails-5-default-protect-from-forgery-prepend-false)

- Author: Vijay Kumar Agrawal
- Published: April 6, 2016
- Categories: Rails 5, Rails

The default order of protect_from_forgery is changed from prepend to call order.

### Rails 5 provides config to use UUID as primary key

[Rails 5 provides config to use UUID as primary key](https://www.bigbinary.com/blog/rails-5-provides-application-config-to-use-UUID-as-primary-key)

- Author: Vijay Kumar Agrawal
- Published: April 4, 2016
- Categories: Rails 5, Rails

Rails can use UUID as primary key for all the migrations by setting config.

### Rails 5 changed Active Job default adapter to Async

[Rails 5 changed Active Job default adapter to Async](https://www.bigbinary.com/blog/rails-5-changed-default-active-job-adapter-to-async)

- Author: Mohit Natoo
- Published: March 29, 2016
- Categories: Rails 5, Rails

The default Active Job adapter has been changed to Async from Inline in Rails 5.

### Support for left outer join in Rails 5

[Support for left outer join in Rails 5](https://www.bigbinary.com/blog/support-for-left-outer-joins-in-rails-5)

- Author: Ratnadeep Deshmane
- Published: March 24, 2016
- Categories: Rails 5, Rails

No need of writing SQL in your code every time there is need to do left outer
join

### has_secure_token for unique random token in Rails 5

[has_secure_token for unique random token in Rails 5](https://www.bigbinary.com/blog/has-secure-token-to-generate-unique-random-token-in-rails-5)

- Author: Abhishek Jain
- Published: March 23, 2016
- Categories: Rails 5, Rails

Use has_secure_token to handle creation and regeneration unique random
alphanumeric token

### Suppress save events in Rails 5

[Suppress save events in Rails 5](https://www.bigbinary.com/blog/suppress-save-events-in-rails-5)

- Author: Abhishek Jain
- Published: March 11, 2016
- Categories: Rails 5, Rails

Rails 5 introduces way to suppress save events on a model

### Rails 5 improves rendering partial from cache

[Rails 5 improves rendering partial from cache](https://www.bigbinary.com/blog/rails-5-makes-partial-redering-from-cache-substantially-faster)

- Author: Ratnadeep Deshmane
- Published: March 9, 2016
- Categories: Rails 5, Rails

With the inclusion of multi_fetch_fragments gem in Rails core, Rails 5 improves
page load speeds substantially.

### Rails 5 switches from strong etags to weak etags

[Rails 5 switches from strong etags to weak etags](https://www.bigbinary.com/blog/rails-5-switches-from-strong-etags-to-weak-tags)

- Author: Prajakta Tambe
- Published: March 8, 2016
- Categories: Rails 5, Rails

Rails 5 switches from strong etags to weak etags

### Parameter filtering enhancement in Rails 5

[Parameter filtering enhancement in Rails 5](https://www.bigbinary.com/blog/parameter-filtering-enhacement-rails-5)

- Author: Vijay Kumar Agrawal
- Published: March 7, 2016
- Categories: Rails 5, Rails

Rails 5 enhances parameter filtering of sensitive data appearing in the logs

### Rails 5 adds http_cache_forever

[Rails 5 adds http_cache_forever](https://www.bigbinary.com/blog/rails-5-adds-http-cache-forever)

- Author: Abhishek Jain
- Published: March 4, 2016
- Categories: Rails 5, Rails

Rails 5 introduces way to cache response forever by adding http_cache_forever

### Better exception responses in Rails 5 API apps

[Better exception responses in Rails 5 API apps](https://www.bigbinary.com/blog/better-exception-responses-in-rails-5-api-apps)

- Author: Akshay Mohite
- Published: March 3, 2016
- Categories: Rails 5, Rails

Rails 5 responds with proper responses to exceptions even for API apps with
introduction of new configuration debug_exception_format.

### Use file_fixture to access test files in Rails 5

[Use file_fixture to access test files in Rails 5](https://www.bigbinary.com/blog/use-file_fixture-to-access-test-files-rails-5)

- Author: Ershad Kunnakkadan
- Published: March 2, 2016
- Categories: Rails 5, Rails

Use file_fixture in Rails 5 to access test files

### Migrations are versioned in Rails 5

[Migrations are versioned in Rails 5](https://www.bigbinary.com/blog/migrations-are-versioned-in-rails-5)

- Author: Abhishek Jain
- Published: March 1, 2016
- Categories: Rails 5, Rails

Migrations are versioned from Rails 5 onwards.

### Rails 5 improves redirect_to:back method

[Rails 5 improves redirect_to:back method](https://www.bigbinary.com/blog/rails-5-improves-redirect_to_back-with-redirect-back)

- Author: Abhishek Jain
- Published: February 29, 2016
- Categories: Rails 5, Rails

Rails 5 introduces redirect_back method with fallback_location instead of using
redirect_to:back

### Rails 5 allows configuring queue name for mailers

[Rails 5 allows configuring queue name for mailers](https://www.bigbinary.com/blog/rails-5-allows-configuring-queue-name-for-mailers)

- Author: Abhishek Jain
- Published: February 26, 2016
- Categories: Rails 5, Rails

We can configure queue name for mailers with Rails 5

### Rails 5 handles DateTime with better precision

[Rails 5 handles DateTime with better precision](https://www.bigbinary.com/blog/rails-5-handles-datetime-with-better-precision)

- Author: Abhishek Jain
- Published: February 23, 2016
- Categories: Rails 5, Rails

MYSQL 5.6 and above version have started rounding of the milliseconds and it's
impact and fix with Rails 5.

### Active Support Improvements in Rails 5

[Active Support Improvements in Rails 5](https://www.bigbinary.com/blog/active-support-improvements-in-Rails-5)

- Author: Abhishek Jain
- Published: February 17, 2016
- Categories: Rails 5, Rails

Rails 5 introduces number of new methods in Rails 5

### Rails 5 improves route search with advanced options

[Rails 5 improves route search with advanced options](https://www.bigbinary.com/blog/rails-5-options-for-rake-routes)

- Author: Abhishek Jain
- Published: February 16, 2016
- Categories: Rails 5, Rails

Rails 5 brings additional options for rake routes task to display specific
routes.

### Rails 5 makes belongs_to association required by default

[Rails 5 makes belongs_to association required by default](https://www.bigbinary.com/blog/rails-5-makes-belong-to-association-required-by-default)

- Author: Abhishek Jain
- Published: February 15, 2016
- Categories: Rails 5, Rails

Rails 5 makes it necessary to have belongs_to association record by default.

### Rails 5 doesn't halt callback chain if false is returned

[Rails 5 doesn't halt callback chain if false is returned](https://www.bigbinary.com/blog/rails-5-does-not-halt-callback-chain-when-false-is-returned)

- Author: Abhishek Jain
- Published: February 13, 2016
- Categories: Rails 5, Rails

Preferred way of halting callback chain in Rails 5 is now using throw(:abort)
instead of returning false.

### Configuring bundler using bundle config

[Configuring bundler using bundle config](https://www.bigbinary.com/blog/configuring-bundler-using-bundle-config)

- Author: Prajakta Tambe
- Published: February 9, 2016
- Categories: Rails

Set bundler configuration options via bundle config.

### Caching result sets and collection in Rails 5

[Caching result sets and collection in Rails 5](https://www.bigbinary.com/blog/activerecord-relation-cache-key)

- Author: Mohit Natoo
- Published: February 2, 2016
- Categories: Rails 5, Rails

Rails 5 provides cache_key for ActiveRecord::Relation that can help in caching
result of a collection of records.

### Caching in development environment in Rails 5

[Caching in development environment in Rails 5](https://www.bigbinary.com/blog/caching-in-development-environment-in-rails5)

- Author: Mohit Natoo
- Published: January 25, 2016
- Categories: Rails 5, Rails

Rails 5 has added ability to enable cache in development environment without
changing environment.rb file. This blog post discusses the feature.

### Rails 5 wraps all rake commands using rails

[Rails 5 wraps all rake commands using rails](https://www.bigbinary.com/blog/rails-5-supports-rake-commands-using-rails)

- Author: Mohit Natoo
- Published: January 14, 2016
- Categories: Rails 5, Rails

In Rails 4 some commands use rake and some commands use rails. Rails 5 brings
consistency by having rails command to do everything.

### Each form gets its own CSRF token in Rails 5

[Each form gets its own CSRF token in Rails 5](https://www.bigbinary.com/blog/per-form-csrf-token-in-rails-5)

- Author: Prajakta Tambe
- Published: January 11, 2016
- Categories: Rails 5, Rails

Rails 5 allows each form to have its own CSRF token to prevent hacking of the
site.

### Rendering views outside of controllers in Rails 5

[Rendering views outside of controllers in Rails 5](https://www.bigbinary.com/blog/rendering-views-outside-of-controllers-in-rails-5)

- Author: Prathamesh Sonpatki
- Published: January 8, 2016
- Categories: Rails 5, Rails

Rails 5 allows rendering views outside of controllers. It has many benefits like
now views can be used in Mailers and other places.

### Not using https might be breaking file uploads

[Not using https might be breaking file uploads](https://www.bigbinary.com/blog/not-using-https-might-be-breaking-file-uploads)

- Author: Chirag Shah
- Published: January 7, 2016
- Categories: Rails

Using http instead of https might be breaking your file uploads. This blog
explains how and why it happens.

### Test runner in Rails 5

[Test runner in Rails 5](https://www.bigbinary.com/blog/test-runner-in-rails-5)

- Author: Prathamesh Sonpatki
- Published: January 3, 2016
- Categories: Rails 5, Rails

Running tests got much easier in Rails 5. Now failing tests point to line number
and makes it easier to re run a failing test. There are many more goodies.

### ApplicationRecord in Rails 5

[ApplicationRecord in Rails 5](https://www.bigbinary.com/blog/application-record-in-rails-5)

- Author: Prathamesh Sonpatki
- Published: December 28, 2015
- Categories: Rails 5, Rails

If we want to add a functionality to all models we no longer need to pollute
whole ActiveRecord::Base. Just add that feature to ApplicationRecord.

### How constant lookup and resolution works in Ruby on Rails

[How constant lookup and resolution works in Ruby on Rails](https://www.bigbinary.com/blog/how-constant-lookup-happens-in-rails)

- Author: Mohit Natoo
- Published: November 5, 2015
- Categories: Rails

Rails has its own way of maintaining constants and looking for it when it is not
found. This blog discusses all that and much more.

### Rails 5 allows setting custom HTTP Headers for assets

[Rails 5 allows setting custom HTTP Headers for assets](https://www.bigbinary.com/blog/rails-5-allows-setting-custom-http-headers-for-assets)

- Author: Vipul
- Published: October 31, 2015
- Categories: Rails 5, Rails

Ability to set custom HTTP header is needed to have better control over the
delivery of assets. In this blog we'll see how that can be done.

### Migrating Rails app from postgresql to sql server

[Migrating Rails app from postgresql to sql server](https://www.bigbinary.com/blog/migrating-from-postgresql-to-sqlserver)

- Author: Rohit Kumar
- Published: October 13, 2015
- Categories: Rails

Migrating rails app from postgresql to sql server

### Using ReactJS with Rails Action Cable

[Using ReactJS with Rails Action Cable](https://www.bigbinary.com/blog/using-reactjs-with-rails-actioncable)

- Author: Vipul
- Published: July 19, 2015
- Categories: Rails

Using ReactJS with Rails Action Cable for real-time applications.

### Verifying PubSub Services from Rails using Redis

[Verifying PubSub Services from Rails using Redis](https://www.bigbinary.com/blog/verifying-pubsub-services-from-rails-redis)

- Author: Vipul
- Published: May 9, 2015
- Categories: Rails

Verifying PubSub Services from Rails with example based on Redis

### Voice based phone verification using twilio

[Voice based phone verification using twilio](https://www.bigbinary.com/blog/voice-based-phone-verification-using-twilio)

- Author: Santosh Wadghule
- Published: March 18, 2015
- Categories: Rails

In this blog we discuss how to do voice based phone verification using Twilio.

### Gotcha with after_commit callback in Rails

[Gotcha with after_commit callback in Rails](https://www.bigbinary.com/blog/gotcha-with-after_commit-callback-in-rails)

- Author: Prathamesh Sonpatki
- Published: March 1, 2015
- Categories: Rails

Gotcha with after_commit callback in Rails

### Phone verification using SMS via Twilio

[Phone verification using SMS via Twilio](https://www.bigbinary.com/blog/phone-verification-using-twilio)

- Author: Santosh Wadghule
- Published: January 12, 2015
- Categories: Rails

These days it is a common need to verify Phone using SMS. In this blog we will
show you how to do that using Twilio.

### Migrating existing session cookies while upgrading

[Migrating existing session cookies while upgrading](https://www.bigbinary.com/blog/migrating-existing-session-cookies-while-upgrading-to-rails-4-1-and-above)

- Author: Prathamesh Sonpatki
- Published: December 23, 2014
- Categories: Rails

Safely upgrade to Rails 4.1 and migrate existing session cookies without forcing
users to login again.

### Rails Girls Pune 2014

[Rails Girls Pune 2014](https://www.bigbinary.com/blog/rails-girls-pune-2014)

- Author: Vipul
- Published: December 14, 2014
- Categories: Rails

RailsGirls Pune 2014

### DRYing up Rails Views with View Carriers and Services

[DRYing up Rails Views with View Carriers and Services](https://www.bigbinary.com/blog/drying-up-rails-views-with-view-carriers-and-services)

- Author: Vipul
- Published: December 2, 2014
- Categories: Rails

Rails views can get complicated with all sorts of business logic. In this blog
we are going to show how we made Rails views simpler by using Carriers.

### Make Outbound calls to a phone using Twilio and Rails

[Make Outbound calls to a phone using Twilio and Rails](https://www.bigbinary.com/blog/twilio-rails-calling-from-browser-to-a-phone)

- Author: Vipul
- Published: September 29, 2014
- Categories: Rails

Make Outbound Calls From the Browser to Phone using Twilio and Rails

### Tricks and Tips for using Fixtures effectively in Rails

[Tricks and Tips for using Fixtures effectively in Rails](https://www.bigbinary.com/blog/tricks-and-tips-for-using-fixtures-in-rails)

- Author: Prathamesh Sonpatki
- Published: September 21, 2014
- Categories: Rails

Tricks and Tips for using Fixtures effectively in Rails

### DeccanRubyConf 2014. Hou De!

[DeccanRubyConf 2014. Hou De!](https://www.bigbinary.com/blog/deccanrubyconf)

- Author: Santosh Wadghule
- Published: August 3, 2014
- Categories: Rails

This post talks about my experience for Pune's first DeccanRubyConf 2014.

### Flash access changes in Rails 4.1

[Flash access changes in Rails 4.1](https://www.bigbinary.com/blog/flash-access-changes-rails-4-1)

- Author: Vipul
- Published: July 24, 2014
- Categories: Rails

This post describes a flash object access changes due to new json cookie
serialization in Rails 4.1

### Issue with Delayed Job lifecycle and Postgres Errors

[Issue with Delayed Job lifecycle and Postgres Errors](https://www.bigbinary.com/blog/delayed-job-lifecycle-issue)

- Author: Vipul
- Published: July 23, 2014
- Categories: Rails

This post describes a problem in DelayedJob Lifecycle leading to database
connection issues.

### RedDotRubyConf 2014

[RedDotRubyConf 2014](https://www.bigbinary.com/blog/reddotrubyconf)

- Author: Prathamesh Sonpatki
- Published: July 1, 2014
- Categories: Rails

This post talks about our experiences attending RedDotRubyConf 2014 in
Singapore.

### Six Year Old Optional / Keyword Arguments bug

[Six Year Old Optional / Keyword Arguments bug](https://www.bigbinary.com/blog/six-years-old-optional-keyword-arguments-bug)

- Author: Vipul
- Published: April 28, 2014
- Categories: Rails, Ruby

This blog discusses a Six Year Old Optional / Keyword Arguments bug that was
fixed recently in Ruby 2.2

### How to add additional directories to test

[How to add additional directories to test](https://www.bigbinary.com/blog/adding-directory-to-rake-test)

- Author: Neeraj Singh
- Published: April 26, 2014
- Categories: Rails

This blog discusses how to add additional directories to test

### Configuring Log Formatting in Rails

[Configuring Log Formatting in Rails](https://www.bigbinary.com/blog/logger-formatting-in-rails)

- Author: Vipul
- Published: March 3, 2014
- Categories: Rails

This blog discusses how custom Logger can be used in Rails, and configuring Log
Formatting.

### Displaying non repeating random records

[Displaying non repeating random records](https://www.bigbinary.com/blog/non-repeating-random-records)

- Author: Neeraj Singh
- Published: November 13, 2013
- Categories: Rails

Displaying random records is easy. But sometimes it can show duplicate records.
This blog discusses how to show random records without showing duplicate
records.

### Active Record is still magical

[Active Record is still magical](https://www.bigbinary.com/blog/active-record-is-still-magical)

- Author: Neeraj Singh
- Published: October 30, 2013
- Categories: Rails

Slides and video of my presentation at Wicked Good Ruby Conferenece.

### Visitor pattern and double dispatch in ruby

[Visitor pattern and double dispatch in ruby](https://www.bigbinary.com/blog/visitor-pattern-and-double-dispatch)

- Author: Neeraj Singh
- Published: July 7, 2013
- Categories: Rails

Visitor pattern is a common pattern to traverse a tree. This blog discusses what
visitor pattern is and how to write code for that in ruby.

### Preload, Eagerload, Includes and Joins

[Preload, Eagerload, Includes and Joins](https://www.bigbinary.com/blog/preload-vs-eager-load-vs-joins-vs-includes)

- Author: Neeraj Singh
- Published: July 1, 2013
- Categories: Rails

ActiveRecord does a lot of magical stuff. This blog discusses how it pulls of
Preload, Eagerload, Includes and Joins.

### Cookies on Rails

[Cookies on Rails](https://www.bigbinary.com/blog/cookies-on-rails)

- Author: Neeraj Singh
- Published: March 19, 2013
- Categories: Rails

A deep dive into how Rails handles cookies. How Rails keeps cookies encrypted
and how to protect your data.

### Understanding instance exec in ruby

[Understanding instance exec in ruby](https://www.bigbinary.com/blog/understanding-instance-exec-in-ruby)

- Author: Neeraj Singh
- Published: March 12, 2013
- Categories: Rails

instance_exec is a usefull tool in Ruby. But the usage of it could be a bit
confusing. See this blog to gain better understanding.

### Rex, Rexical and Rails routing

[Rex, Rexical and Rails routing](https://www.bigbinary.com/blog/rex-rexical-and-rails-routing)

- Author: Neeraj Singh
- Published: February 1, 2013
- Categories: Rails

Rails routing uses its own grammar. To better understand how grammar works we
will look at Rex and Rexical.

### Rails Routing -- a comprehensive look at routing

[Rails Routing -- a comprehensive look at routing](https://www.bigbinary.com/blog/journey-into-rails-routing)

- Author: Neeraj Singh
- Published: January 29, 2013
- Categories: Rails

A deep dive into how Rails handles routing.

### Life of save in ActiveRecord

[Life of save in ActiveRecord](https://www.bigbinary.com/blog/live-of-save-in-activerecord)

- Author: Neeraj Singh
- Published: January 15, 2013
- Categories: Rails

ActiveRecord saves record by going through saving process in layers. This blog
takes a deep dive into how ActiveRecord saves a record.

### Redirect to www for heroku with SSL

[Redirect to www for heroku with SSL](https://www.bigbinary.com/blog/redirect-to-www-heroku-ssl)

- Author: Neeraj Singh
- Published: October 12, 2012
- Categories: Rails

How to redirect to https version of the url.

### Solr, Sunspot, Websolr and Delayed job

[Solr, Sunspot, Websolr and Delayed job](https://www.bigbinary.com/blog/solr-sunspot-websolr-delayed-job)

- Author: Neeraj Singh
- Published: October 11, 2012
- Categories: Rails

Handling Solr with Delayed job has a few gotchas which we are going to look into
in this blog.

### Data-behavior is for JavaScript developers

[Data-behavior is for JavaScript developers](https://www.bigbinary.com/blog/data-behavior)

- Author: Neeraj Singh
- Published: October 10, 2012
- Categories: Rails

JavaScript operations should not be based on class of the element. A better
solution would be to use data-behavior.

### Test factories first

[Test factories first](https://www.bigbinary.com/blog/test-factories-first)

- Author: Neeraj Singh
- Published: October 10, 2012
- Categories: Rails

Before running any tests make sure that all factories are running ok.

### CSRF and Rails

[CSRF and Rails](https://www.bigbinary.com/blog/csrf-and-rails)

- Author: Neeraj Singh
- Published: May 10, 2012
- Categories: Rails

Cross site request forgery attacks are common. Rails has mechanisms to protect
applications from such attacks. This blog discusses how Rails provides those
mechansisms.

### XSS and Rails

[XSS and Rails](https://www.bigbinary.com/blog/xss-and-rails)

- Author: Neeraj Singh
- Published: May 10, 2012
- Categories: Rails

Cross site scripting attacks are common. Rails has mechanisms to protect
applications from such attacks. This blog discusses how Rails provides those
mechansisms.

### tsort in ruby and rails initializers

[tsort in ruby and rails initializers](https://www.bigbinary.com/blog/tsort-in-ruby)

- Author: Neeraj Singh
- Published: March 16, 2012
- Categories: Rails

This blog discusses what tsort is and how Rails initializers uses it.

### Mime type resolution in Rails

[Mime type resolution in Rails](https://www.bigbinary.com/blog/mime-type-resolution-in-rails)

- Author: Neeraj Singh
- Published: November 23, 2010
- Categories: Rails

Resolving mime types is complicated. Different vendors have mad the situation
worse by not properly adhering to the standard. This blog take a closer look at
how mime type resolution works in Rails.

### I am not seeing hoptoad messages. Now I know why.

[I am not seeing hoptoad messages. Now I know why.](https://www.bigbinary.com/blog/I-am-not-seeing-hoptoad-messages)

- Author: Neeraj Singh
- Published: April 23, 2010
- Categories: Rails

consider_all_request_local determnies if exception should be sent to the hoptoad
server or not. See this blog to understand more about it.

### Order of format matters in respond_to block

[Order of format matters in respond_to block](https://www.bigbinary.com/blog/order-of-format-matters-in-respond_to-block)

- Author: Neeraj Singh
- Published: January 25, 2010
- Categories: Rails

In Rails we use respond_to to respond to different types of requests. The order
in which different formats are handled matters. This blog takes a look at that
issue.

### Determining if commits are executed in a transaction

[Determining if commits are executed in a transaction](https://www.bigbinary.com/blog/how-to-find-if-my-commits-are-executed-in-a-transaction-or-not)

- Author: Neeraj Singh
- Published: March 13, 2009
- Categories: Rails

How to find if my commits are executed in a transaction or not

### Restful architecture does not mean one to one mapping

[Restful architecture does not mean one to one mapping](https://www.bigbinary.com/blog/restful-architecture-does-not-mean-one-to-one-mapping-with-model)

- Author: Neeraj Singh
- Published: February 17, 2009
- Categories: Rails

REST style does not mean that we need to have a controller for every model. We
can mix and match.

### Configure local_request

[Configure local_request](https://www.bigbinary.com/blog/rescue_action_in_public-local_request-and-how-to-configure-local_request)

- Author: Neeraj Singh
- Published: February 5, 2009
- Categories: Rails

How does Rails handle exceptions? Rails exception handling depends on two
factors and we are going to discuss both of them here.

### Override automatic updated_at in ActiveRecord/Rails

[Override automatic updated_at in ActiveRecord/Rails](https://www.bigbinary.com/blog/override-automatic-timestamp-in-activerecord-rails)

- Author: Neeraj Singh
- Published: January 21, 2009
- Categories: Rails

Rails automatically updates updated_at. But it can be overcome.

### Under the hood how named_scope works

[Under the hood how named_scope works](https://www.bigbinary.com/blog/under-the-hood-how-named-scope-works)

- Author: Neeraj Singh
- Published: October 17, 2008
- Categories: Rails

named_scope is awesome. But how does it work. How does it pull off all those
tricks which seem magical. This blog takes a deep dive and looks into code to
see how named_scope really works.

## Links

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