     |> PageMetadata.add(Tweak.to_metadata(tweak))
     |> render("show.html", name: name, tweak: tweak)
   end
+
+  @doc """
+  Updates a tweak with the given parameters.
+  """
+  @spec update(Plug.Conn.t(), Map.t(), current_user) :: Plug.Conn.t()
+  def update(conn, params, current_user)
 
   def update(conn, %{"user_id" => name, "id" => id, "tweak" => tweak_params}, _current_user) do
     tweak = Repo.get(Tweak, id)


  require Logger

  def action(conn, _) do
    args = [conn, conn.params, conn.assigns[:current_user] || :guest]
    apply(__MODULE__, action_name(conn), args)
  end

  def create(conn, _, :guest), do: raise(NotLoggedInError, conn: conn)


    end
  end

  @doc """
  Deletes the given tweak.

  **Not implemented.**
  """
  @spec delete(Plug.Conn.t(), Map.t(), current_user) :: Plug.Conn.t()
  def delete(conn, _params, _current_user) do
    conn
  end

  @doc """
  Displays the edit tweak form.
  """
  @spec edit(Plug.Conn.t(), Map.t(), current_user) :: Plug.Conn.t()
  def edit(conn, params, current_user)

  def edit(conn, _, :guest), do: render_error(conn, :unauthorized)

