fix deprecated .all relation in rails 4