 
   def create(conn, params) do
     Post.create params
-    redirect conn, to: Blog.Router.Helpers.posts_path(conn, :index)
+    redirect conn, to: posts_path(conn, :index)
   end
 
   def edit(conn, params) do

defmodule Blog.PostsController do
  use Phoenix.Controller

  plug :action



  def update(conn, params) do
    post = Post.update params
    redirect conn, to: posts_path(conn, :index)
  end

  def destroy(conn, params) do
    post = Post.destroy params["id"]
    redirect conn, to: posts_path(conn, :index)
  end
end
