now works with rails