upgraded rails patch and changed test to work