Implementing Jbuilder for creating JSON Response in Ruby on Rails

This article will discuss how to implement JBuilder for creating JSON response in Ruby on Rails.

How to implement charts and graphs in a Ruby on Rails 6 application

This article will discuss how to implement charts and graphs in Ruby on Rails 6 applications.

Authorization with CanCanCan in Rails

This article will discuss how to implement authorization in a Ruby on Rails application using CanCanCan. Here’s how to start:

Integrate AWS S3 with ActiveStorage in Rails

This article will discuss how to integrate AWS S3 in a Ruby on Rails application using ActiveStorage.

Scraping with Ruby and Selenium

This article will discuss how to scrape websites in Ruby and Selenium. CSS class selectors will be used to scrape the data.

Multiple Themes in Rails 6 Applications

This article will discuss how to implement multiple bootstrap themes in Ruby on Rails 6 applications. This article is a continuation of this article, which explains how to implement a single theme.

Devise Token Auth in Ruby on Rails 6

This article will discuss how to implement token-based authentication using a gem called devise_token_auth. Here’s how to get started:

Integrating VUE JS in Ruby on Rails 6

This article will discuss how to integrate VUE JS in a Ruby on Rails 6 application. Here’s how to start:

Adding A Bootstrap Theme in Ruby on Rails 6

This article will explain how to use a bootstrap theme in a Ruby on Rails 6 application using AdmineLTE3. Start like this:

Writing to Spreadsheets in Ruby on Rails

Frequently developers need to write data to files like .csv and .xlsx. This article will discuss this common use case in Ruby on Rails applications.

Routing with Friendly IDs in Rails

Imagine you have a fruit shop application built in Ruby on Rails. As a Rails developer, you know that to get to a specific fruit page, a URL like www.myfruitshop/1 will work - but it’s more user friendly to use something like this:

Implementing Ajax in Ruby on Rails

This article will discuss how to implement Ajax in a Rails 6 application. Here’s how to start:

Adding JQuery in Ruby on Rails 6 Applications

As any Ruby on Rails developer knows, webpacker was a major addition in Rails 6. With the introduction of webpacker, Rails applications no longer need asset pipeline. The app/assets/javascript is moved to app/javascript.

Uploading Images from URLs in Rails ActiveStorage

This article will discuss how to attach images to a model from URLs with ActiveStorage.

Conditional Validations in Rails ActiveRecord

Conditional validations can be used when a validation needs to be run only if a condition is satisfied. This can be implemented in many ways, a few of which we will discuss in this article.

How to parse spreadsheets with Roo gem in Ruby on Rails

It’s common to need to read data from .csv or .xlsx files and insert that data into the database. This is a frequent use case in web development. In this article, we will discuss this use case in Ruby on Rails applications.

Using Enums in Ruby on Rails

For Rails developers, using enums with ActiveRecord is always a good choice when you have to manage the state of an object. For example, for an online shop, you may have three states of an order - i.e. received, dispatched and delivered. One option is to add three boolean fields in the database for received, dispatched and delivered, but this approach looks ugly. A cleaner approach is to add a single string column status that includes values of received, dispatched and delivered, then add three methods in the model file.

Authentication with Mobile Numbers in Rails using Devise

Many applications use mobile number authentication instead of email-based authentication. This article will discuss the technique to override default authentication behavior. Here are the steps to authenticate using a mobile number:

Sending SMS in Ruby on Rails Application using Twilio

This article will discuss how to send an sms in a Ruby on Rails application using Twilio.

Optimistic Locking vs Pessimistic Locking in Ruby on Rails

Locking in a database means that no two or more sessions can update the same record at the same time until the lock is released. In this article we will discuss two main types of locking in Ruby on Rails; Optimistic Locking and Pessimistic Locking.

Working with Custom Validations in Rails

This article will discuss a concept known as Custom Validations in Rails Active Record. There are two types of custom validations; Custom Validators and Custom Methods.

Understanding ActiveRecord Transactions

This article will discuss database transactions and how to use them in Ruby on Rails. Transaction in a database means the state of the database will only change if all the statements in a transaction block succeed, otherwise all the statements will roll back and no state change will occur.

Speeding up Rails Applications with Optimized Database Queries

This article will discuss the most basic technique to speed up a Rails application by optimizing database queries.

Searching made easy with pg_search gem in Ruby on Rails

This article will discuss how to make search functionality easier and faster in Ruby on Rails through a gem called pg_search. According to the official documentation:

Polymorphic Association in Ruby on Rails

This article will discuss Polymorphic Association, an important concept in Ruby on Rails.