Make it Rails

This is quite a dramatic PR. It resolves #35, converting the project to Rails for the reasons outlined in that Issue.
I might move this block of code into it's own class … in the future.