After months developing in Typescript with NestJS due to demands from my current job, I managed to find some time for my beloved Ruby on Rails. Even better now, since I don’t officially work with Rails, I can indulge myself in exploring the newly released alpha version 7 for my personal projects.
In part I of this post I explained a little about the concept and features of Full Text Searching do PostgreSQL and I committed to explain with a little Ruby on Rails project through PgSearch gem, so let’s go.
Sinking on the internet I found the PgSearch gem which takes advantage of the Full Text Searching features of PostgreSQL. This Full Text Searching concept refers to computer strategies and techniques to optimize searches of words, phrases or even combinations of words, in big and multiple texts stored in a database. It has been a wide area of study and research within Computer Science since 1990.
Jamis Buck wrote the famous post Skinny Controller, Fat Model, it has become almost the mantra for the MVC pattern - Model-View-Controller. In this case, all logic that isn’t related to client/user response - View-Controller - must be inside the model, to keep response simple or rather, “skinny”.