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
One of the fundamental principles Rails developers follow is Don’t Repeat Yourself (DRY).🔁 We can use concerns, to avoid repeating the same routes defined. To eliminate code duplication rails introduced the routing method :concern. The :concerns option can accept one or more routing concerns.