make it fit for rails4

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