trying to make it work with rails 4.2