crudely removed rails 4 dependency (for now)