Update code related to Relation#all which has been removed from rails 4....

Update code related to Relation#all which has been removed from rails 4.1
Avoid using {...} for multi-line blocks.<br>Block body expression is on the same line as the block start.