Fixed rails best practices warnings

Avoid using {...} for multi-line blocks.<br>Block body expression is on the same line as the block start.