Merged & reconfigured from gsprenger/railsproject