A cheap update to get this working with up-to-date rails.