Refactored rails/routes.rb to avoid repeated code
Merge pull request #2401 from jd-erreape/master

Refactor to avoid repeated code