codingwithaglassofmilk.hashnode.devMicroservices in RailsMicroservices architecture is an architectural style that structures an application as a collection of distributed services. This allows better separation of responsibilities, greater flexibility in the choice of technologies for each service, and ea...May 30, 2025·6 min read
codingwithaglassofmilk.hashnode.devShallow vs Deep Nested Resources in RailsIn Rails, in order to create routes we’ve define resources. Resources provide a mapping between an http verb with its URL and a controller action. For eg. to create routes for posts we’ve to add following to our routes.rb: # routes.rb Rails.applicati...May 30, 2025·3 min read
codingwithaglassofmilk.hashnode.devSetting Up Devise With Rails 7In this blog we’re going to look at how to setup devise gem with rails 7 using importmaps. If you want to just setup devise without knowing the nitty gritty follow tldr; otherwise scroll past it for the full blog. tldr; Follow thsese steps to setup ...May 30, 2025·7 min read
codingwithaglassofmilk.hashnode.devSingle Table InheritanceWhat is Single Table Inheritance ? Single Table Inheritance is a mechanism through which ActiveRecord can share fields and behavior between different models while using a single table. For eg. let’s say we need to create a Vehicle model and Car mod...May 30, 2025·2 min read
codingwithaglassofmilk.hashnode.devPolymorphic AssociationsWhat is Polymorphic Associations ? With Polymorphic Association a model can belong to more than one models with a single association. Let’s take an example, we’ll use polymorphic associations as shown in the following schema: In the above schema p...May 30, 2025·2 min read