Solutions for Updating ActiveStorage Attachments

While updating ActiveStorage attachments, particularly those with the has_many_attached association in a Rails application, some common issues can arise. This article will discuss some such issues and their possible solutions.

The Difference Between Joins and Includes in Rails ActiveRecord

In this article we will be explaining the difference between includes and joins in Rails ActiveRecord, a topic which often confuses newbies to Rails.

Updating ActiveRecord Attachments in Rails

If you need to update an active record attachment that has been attached using has_one_attached relation with the parent model, you may encounter errors. Here’s an example:

HTTP Basic Authentication in Ruby on Rails

This article will discuss HTTP Basic Authentication in Ruby on Rails. This can be useful when a page needs to be accessible only to users with a password.

Automatically Generating User Passwords with Devise

This article will discuss how to bypass password and password confirmation in the registration process and send a password through email when a user registers themselves.

Implementing Single Table Inheritance with Devise in Ruby on Rails

This article will discuss implementing STI(Single Table Inheritance) using Devise. First, create a project.

Creating an Admin Panel with ActiveAdmin in Ruby on Rails

This article will discuss how to implement an admin panel with activeadmin in Ruby on Rails. First, create a project and a few models.

Optimizing Rails Applications with Bullet gem(N + 1 Problem)

This article will discuss bullet gem which helps you watch n + 1 queries when they are being used unnecessarily, as well as helping you to determine when they should be used.

Generate ERD in Ruby on Rails

Keeping technical documentation handy is extremely useful, especially when a project gets huge in terms of the code and database. One of the documents that should be included in the documentation is an Entity Relationship Diagram, or ERD. This article will discuss how to generate ERD at any stage of a project.

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.