Ruby on Rails Articles

Rails

Everything you need to know about the Active Model Serializer gem

Active model serializer is a gem that allows you to customize your ruby on rails JSON response. With this gem, you can choose which and how attributes and relationships will be rendered.

Rails

Add FAQ markup schema to your articles in Ruby on Rails

Learn how to add a FAQ model for your articles in your Ruby on Rails application and then create the markup schema that you can put within your head tag.

Rails

Current attributes in Rails

Rails 5.2 adds support for CurrentAttributes which give you access to global variables in your application.

Rails

How to pass attr accessors in your JSON response

If your attr accessors are not being passed through your json response, here's how to fix it

Rails

What are the Ruby on Rails column types?

Find out all the different column types that you can add in your Ruby on Rails app.

Rails

How to run a worker from the console

If you want to test your sidekiq worker from the console, you can call it using the following command.

Rails

First vs take vs Limit methods in Rails

Learn about the differences between the methods first vs take vs limit

Rails

Checklist for deploying your Rails app to production on Heroku

Evething you need to do before you deploy. This is my checklist that I follow when I deploy a new feature of my Rails app to production on Heroku.

Rails

An easy way to connect your Rails server to your phone

Test your Rails application on your mobile phone or another laptop when they are connected to the same IP address

Rails

How to upgrade from Rails 5.2 to Rails 6

Step by step process on how I upgraded my client's websites from Rails 5.2 to Rails 6

Rails

Why a Rails form validation error renders the wrong URL and how to fix it

Learn a bit more about render, redirect_to and resources to find out why the form validation error renders the wrong URL

Rails

Why Letter opener gem doesn't open your letters

This is a simple way to find out why Letter opener is not opening your letters - use .deliver! so you can raise an exception

Rails

Implement a passwordless authentication with Sorcery

Paswordless auth is great and provides a simple UX for your user - in this tutorial I implement in my Rails app using the auth gem Sorcery