I have many active record queries that operate on my Article model. I have just introduced an “active” field in the articles table. Is there any way I could specify that for all my AR queries, I only want to return “active” Articles, and do it without having to change all my existing AR queries?
Share
Yes there is.
http://ryandaigle.com/articles/2008/11/18/what-s-new-in-edge-rails-default-scoping