adding posts as resource in routes.rb
adding create and edit functions