Improved routing helpers to make Rails master work (fixes #108)