Skip to content

Instantly share code, notes, and snippets.

@chrisfishwood
Last active May 19, 2016 06:03
Show Gist options
  • Save chrisfishwood/cc1f8065279bd93d30a795694ca0d764 to your computer and use it in GitHub Desktop.
Save chrisfishwood/cc1f8065279bd93d30a795694ca0d764 to your computer and use it in GitHub Desktop.
EctoUuid router.ex
defmodule EctoUuid.Router do
use EctoUuid.Web, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_flash
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", EctoUuid do
pipe_through :browser # Use the default browser stack
get "/", PageController, :index
resources “/companies”, CompanyController
resources “/managers”, ManagerController
resources “/meetings”, MeetingController
end
# Other scopes may use custom stacks.
# scope "/api", EctoUuid do
# pipe_through :api
# end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment