I have already built a Rails app which have a model called Product. Currently, I have an attribute named approved to mark the approval of a product. So when listing the products, every-time I need to use a where command to check whether approved is true or false? So my question is…
Is there a better way to do this?
Can I override the model’s show all method and show only approved ones?