created resources :posts and corrected a syntax error in posts index view