hacking up to work with rails 4