fix to make it work with rails 4 and spree 2.1.6