Skip to content

Instantly share code, notes, and snippets.

@chrisfishwood
Last active May 19, 2016 06:03
Show Gist options
  • Select an option

  • Save chrisfishwood/cc1f8065279bd93d30a795694ca0d764 to your computer and use it in GitHub Desktop.

Select an option

Save chrisfishwood/cc1f8065279bd93d30a795694ca0d764 to your computer and use it in GitHub Desktop.

Revisions

  1. chrisfishwood renamed this gist May 19, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. chrisfishwood created this gist May 19, 2016.
    29 changes: 29 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    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