Ruby in Rails
  • Home
  • Rails
  • Ruby
  • About
GitHub icon LinkedIn icon
Subscribe

Rails

A collection of 87 posts

Rails

Rails routes difference between resource and resources

Rails provides RESTful routing for resources. Routes can either define single resource or plural resources to generate routes of the application.

Akshay Mohite Akshay Mohite 3 min read
Rails

How to get integer value from enum in Rails?

Getting value of integer stored in database for enum attribute on Rails ActiveRecord models can get tedious. This article will help understand how to fetch integer value of enum on ActiveRecord model in

Akshay Mohite Akshay Mohite 2 min read
Rails

Rails test jbuilder json response with rspec

Testing jbuilder response in rspec integration tests requires an extra helper method to be included in test. Requests in integration tests do not render json response unless we include render_views helper.

Akshay Mohite Akshay Mohite 3 min read
Rails

Rails counter cache associations

Rails provides an ability to cache count of associated table records. This gives an edge that avoids querying to get number of records of associated table.

Akshay Mohite Akshay Mohite 3 min read
Rails

Rails 6.1 ActiveRecord deprecates update_attributes methods

Rails 6.1 ActiveRecord deprecates update_attributes method calls. This method was renamed to update method.

Akshay Mohite Akshay Mohite 1 min read
Rails

Rails changed behavior of attribute_changed in callbacks

Rails changed behavior of attribute_changed? in after and before callbacks. Older versions will throw deprecation warnings indicating which methods to use instead.

Akshay Mohite Akshay Mohite 2 min read
Page 1 of 15 Older Posts »
Ruby in Rails © 2025
Latest Posts Github Twitter LinkedIn

Subscribe to Ruby in Rails

Stay up to date! Get all the latest posts delivered straight to your inbox

Cookiebot session tracker icon loaded