if `edit` is given as path it should redirect to edit_path