fix pagination, update to rails 3.2.13, refactor posts/index view