Skip to content

Instantly share code, notes, and snippets.

@nhu313
Created July 13, 2014 05:54
Show Gist options
  • Save nhu313/d9243f2eacf724077c3e to your computer and use it in GitHub Desktop.
Save nhu313/d9243f2eacf724077c3e to your computer and use it in GitHub Desktop.
Feeder controller
defmodule FeederWeb.Controllers.Pages do
use Phoenix.Controller
def hello(conn, _params) do
render conn, "hello"
end
end
@nhu313
Copy link
Author

nhu313 commented Jul 13, 2014

Controller

defmodule FeederWeb.Router do
  use Phoenix.Router

  plug Plug.Static, at: "/static", from: :feeder_web
  get "/hello", FeederWeb.Controllers.Pages, :hello, as: :page
end

@nhu313
Copy link
Author

nhu313 commented Jul 13, 2014

Got this error
(Phoenix.Template.UndefinedError) No such template "hello.html"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment