refactor new post & edit post forms to use form_for syntax