Reusing Rails Scopes

In this post, I would like to discuss about one of the least explored methods of ActiveRecord i.e. merge. I came across this method after working with Rails for about 2 years. It mainly focuses on merging of scopes in associations. Confused ?? Let’s head straight to an example. Let’s say I’ve orders, line items […]