Relation#all is deprecated in Rails 4, use Relation#to_a instead