     def show(conn, _params), do: text(conn, "show files")
     def index(conn, _params), do: text(conn, "index files")
     def new(conn, _params), do: text(conn, "new files")
-    def create(conn, _params), do: text(conn, "create files")
-    def update(conn, _params), do: text(conn, "update files")
-    def destroy(conn, _params), do: text(conn, "destroy files")
   end
 
   defmodule CommentController do

  end

  test "nested options limit resource by passing :except option" do
    conn = call(Router, :delete, "users/1/posts/2")
    assert conn.status == 404
    conn = call(Router, :get, "users/1/posts/new")
    assert conn.status == 200
  end

  test "nested options limit resource by passing :only option" do
    conn = call(Router, :put, "users/1/sessions/2")
    assert conn.status == 404
    conn = call(Router, :get, "users/1/sessions/")
    assert conn.status == 404
    conn = call(Router, :get, "users/1/sessions/1")
    assert conn.status == 404
    conn = call(Router, :get, "users/1/sessions/new")
    assert conn.status == 200
    conn = call(Router, :post, "users/1/sessions")
    assert conn.status == 200
    conn = call(Router, :delete, "users/1/sessions/1")
    assert conn.status == 200
  end

  test "resource limiting options should work for nested resources" do
    conn = call(Router, :get, "scoped_files")
    assert conn.status == 200
    assert conn.resp_body == "index files"

    conn = call(Router, :get, "scoped_files/1")
    assert conn.status == 404
    conn = call(Router, :put, "scoped_files/1")
    assert conn.status == 404
    conn = call(Router, :post, "scoped_files")
    assert conn.status == 404
    conn = call(Router, :delete, "scoped_files/1")
    assert conn.status == 404

    conn = call(Router, :get, "scoped_files/1/comments")
    assert conn.status == 200
    assert conn.resp_body == "index comments"

    conn = call(Router, :get, "scoped_files/1/comments/1")
    assert conn.status == 200
    assert conn.resp_body == "show comments"

    conn = call(Router, :put, "scoped_files/1/comments/1")
    assert conn.status == 200
    assert conn.resp_body == "update comments"

    conn = call(Router, :post, "scoped_files/1/comments")
    assert conn.status == 200
    assert conn.resp_body == "create comments"

    conn = call(Router, :delete, "scoped_files/1")
    assert conn.status == 404
  end

  test "param option allows default singularlized _id param to be overidden" do
    conn = call(Router, :get, "pages/about")
    assert conn.status == 200
    assert conn.params["slug"] == "about"
    assert conn.resp_body == "show page"
    assert Router.Helpers.area_path(:show, "about") ==
           "/pages/about"

    conn = call(Router, :get, "pages/contact/ratings/the_key")
    assert conn.status == 200
    assert conn.params["area_slug"] == "contact"
    assert conn.params["key"] == "the_key"
    assert conn.resp_body == "show rating"
    assert Router.Helpers.area_vote_path(:show, "contact", "the_key") ==
           "/pages/contact/ratings/the_key"
  end
end


      resources "/comments", CommentController do
        get "/special", CommentController, :special
      end
      resources "/files", FileController, except: [:destroy]
    end

    resources "/files", FileController, only: [:index]

    resources "/admin", UserController, param: "slug", name: "admin", only: [:show] do
      resources "/comments", CommentController, param: "key", name: "post", except: [:destroy]
      resources "files", FileController, only: [:show, :index, :new]
    end
  end

