Last active
February 26, 2016 17:36
-
-
Save tokafish/e97d2247452a96340bb0 to your computer and use it in GitHub Desktop.
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 Phoenix.Ecto.SQL.Sandbox do | |
import Plug.Conn | |
@cookie_name "phoenix.ecto.sql.sandbox" | |
def init(opts), do: opts | |
def call(%{request_path: @config_path <> configuration} = conn, _opts) do | |
conn |> put_resp_cookie(@cookie_name, configuration) |> send_resp(200, "OK") |> halt | |
end | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment