Ruby on Rails: Latest Tutorials
How to change the author of the last commit in Git?
Git is a popular version control system that allows you to track changes to your code and collaborate with other developers. One of the common tasks in Git is changing the author of a commit. Sometimes, you may need to update the author information for a commit due to...
Simplify Your Bash Scripting with Argbash
Bash scripting is a powerful skill for any Linux or Unix administrator or developer. Bash scripts can automate repetitive tasks, perform system maintenance, and deploy applications. However, parsing command-line arguments can be a daunting task, especially for complex...
How to Build an API-Only Application in Ruby on Rails
Ruby on Rails is a powerful web development framework that provides a lot of useful features out of the box. One of these features is the ability to build API-only applications, which are web applications that only provide an API for other applications to consume,...
Building a Contact Form Application with Ruby on Rails
As a software developer, you may often need to build web applications that require a contact form to collect user inquiries or feedback. In this post, we'll walk through the steps of building a contact form application using Ruby on Rails. Step 1: Generate a new Rails...
Validating Email Addresses in Ruby on Rails Models
Validating email addresses is a common requirement when building web applications. In Ruby on Rails, you can use model validation to ensure that an email address is in the correct format before saving it to the database. In this post, we'll cover how to validate email...
Render JSON: Rails Models & Associations Responses
When building a web application with Ruby on Rails, you may need to render JSON responses of your models and their associations. JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write, and easy for machines...
Rails: Understanding save vs. save! Difference
When working with Ruby on Rails, you may find yourself needing to save a model instance to the database. Two methods used to accomplish this task are save and save!. While both methods save a record to the database, they behave differently when an error occurs during...
A Guide to Clearing All Records in a Rails Database
If you're working on a Ruby on Rails application, you may come across situations where you need to clear all records in the database. This can be helpful during testing, when you want to start with a clean slate, or during development when you want to remove all data...
Caching with Instance Variables in Ruby on Rails
Caching is an important aspect of web development that helps to improve the performance and speed of web applications. In Ruby on Rails, caching is implemented using different techniques such as page caching, action caching, and fragment caching. In this blog post, we...