How JWT Tokens Work in Ruby on Rails APIs

When you’re building a Ruby on Rails API, security is crucial. One key aspect of ensuring security is understanding how JWT (JSON Web Tokens) tokens work. In this guide, we’ll break down the basics of JWT tokens in Ruby on Rails APIs with easy-to-understand explanations and practical examples. What’s a JWT Token? JWT tokens act … Read more How JWT Tokens Work in Ruby on Rails APIs

Ruby: Attribute Accessors

Attribute accessors in Ruby are methods that allow you to read and write instance variables of an object. They are commonly used for creating getter and setter methods for object properties. Here are some tips and tricks for using attribute accessors effectively. Leveraging attr_accessor, attr_reader, and attr_writer Ruby furnishes us with three indispensable methods for … Read more Ruby: Attribute Accessors

Include v/s Extend

When we include a module into a particular class, the module methods are imported as instance methods. Whenever we extend a module into a class, the module methods are imported as class methods. I hope you guys enjoy and clear your concept about include and extend. If you want more helpful tips and trick just go through this link: https://jsgrip.com

How to Use Where Method In Rails

In Rails, you can query the database through ActiveRecord methods to access table data. And this one ActiveRecord methods is Where, today we are learn multiple ways to use Where method in rails. If you want to fetch multiple data into one single query then use where method. ActiveRecord gives you a number of ways … Read more How to Use Where Method In Rails