Ruby in Rails

Ruby, Rails, Ruby on Rails Tutorials

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

Rails add_reference vs add_column in migrations

Rails supports schema statements like add_reference and add_columns. They have different options and serve different purpose as illustrated in this post.

Akshay Mohite Akshay Mohite 2 min read

Ruby console [IRB] disable echo output

Ruby console [IRB] echoes the output of last line executed. Sometimes, when data to output is huge, it is quite troublesome. To disable echo in IRB, we need set a echo flag on

Akshay Mohite Akshay Mohite 1 min read

Rails Webpack public packs clean up assets

When using webpacker with Rails, webpack assets from public/packs folder usually occupy a lot of disk space. Thus, it is important to clean up disk space time to time or we can use

Akshay Mohite Akshay Mohite 2 min read

Ruby catch exceptions with StandardError and not Exception

When catching exceptions in Ruby, people often tend to use Exception class. This is often not the intended class. It’s important to understand when to use StandardError, RuntimeError or any other exception class

Akshay Mohite Akshay Mohite 2 min read
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
« Newer Posts Page 5 of 23 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