pagination fixes for rails 3