---
title: "Blogs by Abhishek Jain"
description: "Read BigBinary blog posts by Abhishek Jain."
canonical_url: "https://www.bigbinary.com/blog/authors/abhishek"
markdown_url: "https://www.bigbinary.com/blog/authors/abhishek.md"
---

# Blogs by Abhishek Jain

Read BigBinary blog posts by Abhishek Jain.

## Posts

### New arguments support for float & integer modifiers

[New arguments support for float & integer modifiers](https://www.bigbinary.com/blog/new-ndigits-arguments-supported-for-float-modifiers-in-ruby-2-4)

- Author: Abhishek Jain
- Published: March 28, 2017
- Categories: Ruby 2.4, Ruby

Optional argument ndigits added to ceil, floor, truncate

### Ruby 2.4 adds infinite? and finite? methods to Numeric

[Ruby 2.4 adds infinite? and finite? methods to Numeric](https://www.bigbinary.com/blog/ruby-2-4-adds-infinite-method-to-numeric)

- Author: Abhishek Jain
- Published: December 19, 2016
- Categories: Ruby 2.4, Ruby

Fixnum#infinite?/Bignum#infinite? and Numeric#finite?/Bignum#finite? methods are
now consistent with Float#infinite?/BigDecimal#infinite?

### Ruby 2.4 adds Comparable#clamp method

[Ruby 2.4 adds Comparable#clamp method](https://www.bigbinary.com/blog/ruby-2-4-adds-comparable-clamp-method)

- Author: Abhishek Jain
- Published: December 13, 2016
- Categories: Ruby 2.4, Ruby

Comparable#clamp method is added to Ruby 2.4 to limit the object to a specific
range of values

### Enumerable#chunk not mandatory in Ruby 2.4

[Enumerable#chunk not mandatory in Ruby 2.4](https://www.bigbinary.com/blog/passing-block-with-enumerable-chunk-is-not-mandatory-in-ruby-2-4)

- Author: Abhishek Jain
- Published: November 21, 2016
- Categories: Ruby 2.4, Ruby

Enumerable#chunk does not require a block to be passed along with it in Ruby 2.4

### String#concat, Array#concat & String#prepend Ruby 2.4

[String#concat, Array#concat & String#prepend Ruby 2.4](https://www.bigbinary.com/blog/string-array-concat-and-string-prepend-take-multiple-arguments-in-ruby-2-4)

- Author: Abhishek Jain
- Published: October 28, 2016
- Categories: Ruby 2.4, Ruby

Ruby 2.4 now allows concat and prepend methods to take multiple arguments

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

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

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

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

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

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

## Links

- [Human page](https://www.bigbinary.com/blog/authors/abhishek)
