Refactoring code
Fix conflict with Rails

Thanks to @hsbt for reporting the issue.