More porting to rails 3.2.