Last active
May 19, 2016 06:03
-
-
Save chrisfishwood/cc1f8065279bd93d30a795694ca0d764 to your computer and use it in GitHub Desktop.
EctoUuid router.ex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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