Blog

Page 181 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for In Ruby on Rails, how do I format a date with the "th" suffix, as in, "Sun Oct 5th"?
dateruby-on-rails

In Ruby on Rails, how do I format a date with the "th" suffix, as in, "Sun Oct 5th"?

Published on September 2, 2023

# How to Format Dates with "th" Suffix in Ruby on Rails 📆💎 Have you ever wondered how to display dates with the "th" suffix in Ruby on Rails? You know, like "Sun Oct 5th" or "Thu Oct 2nd"? Look no further! In this blog post, we'll explore a common issue

Cover Image for Rails migrations: Undo default setting for a column
ruby-on-rails

Rails migrations: Undo default setting for a column

Published on September 2, 2023

# Undo Default Setting for a Column in Rails Migrations So, you're working on a Rails project and you find yourself in a situation where you need to undo the default setting for a column in one of your migrations. Don't worry, I've got you covered! In thi

Cover Image for What does inverse_of do? What SQL does it generate?
ruby-on-rails

What does inverse_of do? What SQL does it generate?

Published on September 2, 2023

# Understanding `inverse_of` and the SQL it Generates 😎🔎💻 So, you've stumbled upon the mysterious concept of `inverse_of` in ActiveRecord, and you're wondering: what does it actually do? 🤔 And more importantly, what SQL does it generate? 📥🔍 First o

Cover Image for Error installing libv8: ERROR: Failed to build gem native extension
ruby-on-railswindows

Error installing libv8: ERROR: Failed to build gem native extension

Published on September 2, 2023

📝🔥 Blog Post: How to Fix the Error Installing libv8: ERROR: Failed to Build Gem Native Extension Are you a developer who loves working with Rails projects? If yes, then you might have come across the frustrating "Error installing libv8: ERROR: Failed to

Cover Image for Rails select helper - Default selected value, how?
ruby-on-rails

Rails select helper - Default selected value, how?

Published on September 2, 2023

# Rails select helper - Default selected value, how? 🚀 Are you struggling with setting a default selected value for a Rails select helper? We've got you covered! 🎉 In this blog post, we'll explore a common issue that many developers face and provide you

Cover Image for Rails: How to list database tables/objects using the Rails console?
ruby-on-rails

Rails: How to list database tables/objects using the Rails console?

Published on September 2, 2023

# Rails: How to List Database Tables/Objects using the Rails Console? 😎 Hey there, fellow Rails enthusiasts! 👋 Have you ever found yourself wondering how to easily check what databases or objects are available to you directly from the Rails console? 🤔

Cover Image for Ruby on Rails Callback, what is difference between :before_save and :before_create?
ruby-on-railsruby-on-rails-3validation

Ruby on Rails Callback, what is difference between :before_save and :before_create?

Published on September 2, 2023

📢 Get Ready to Rock with Ruby on Rails Callbacks! 🚀 If you're a Ruby on Rails developer, you've probably encountered the mighty power of callbacks. 🎵 But what's the difference between the 🤔 `:before_save` and `:before_create` callbacks? And how do the

Cover Image for execJs: "Could not find a JavaScript runtime" but execjs AND therubyracer are in Gemfile
ruby-on-rails

execJs: "Could not find a JavaScript runtime" but execjs AND therubyracer are in Gemfile

Published on September 2, 2023

# 🤔 ExecJS: 'Could not find a JavaScript runtime' but execjs AND therubyracer are in Gemfile? Are you facing this baffling error message: `Could not find a JavaScript runtime` while trying to run your Rails application? Don't worry, you're not alone! Thi

Cover Image for Rails 4 Authenticity Token
ruby-on-rails

Rails 4 Authenticity Token

Published on September 2, 2023

📝 **Rails 4 Authenticity Token: Solving the Common Problems** Have you ever encountered the pesky `ActionController::InvalidAuthenticityToken` exceptions when working with Rails 4? 😩 Don't worry, you're not alone! In this blog post, we will explore comm

Cover Image for How to redirect to previous page in Ruby On Rails?
redirectruby-on-rails

How to redirect to previous page in Ruby On Rails?

Published on September 2, 2023

# 🚀 How to Redirect to Previous Page in Ruby On Rails? So, you're trying to redirect back to the previous page in your Ruby on Rails application? You want to ensure that after updating some data, you're redirected to the exact same page with the same sor