Here is а pretty simple and elegant solution to decrease complexity of routes in Ruby on Rails applications.