Recently I've been using ModelName.where(nil)
in certain situations when I might use ModelName.all
.
The difference between the two is that the former returns an ActiveRecord Relation, whereas the latter returns an array. I can chain queries off the former, but not the latter. I'm not pleased that I lose the self-documenting nature of ModelName.all
though.
Is there some method like ModelName.all
that returns an AR Relation and maintains self-documentation?