Replaced deprecated Relation#all with #to_a.