Fixed rails best practices warnings