edit and update actions in posts controller working