         assign(conn, :resource, resource)
       end
 
+      defp handle_custom_actions(%{halted: true} = conn, _, _, _), do: conn
       defp handle_custom_actions({conn, params}, action, defn, _) do
         handle_custom_actions(conn, action, defn, params)
       end

        params = filter_params(conn.params)
        defn = get_registered_by_controller_route!(conn, resource)

        if !restricted_action?(action, defn) && authorized_action?(conn, action, defn) do
          conn
          |> assign(:defn, defn)
          |> load_resource(action, defn, params[:id])
          |> handle_plugs(action, defn)
          |> handle_before_filter(action, defn, params)
          |> handle_custom_actions(action, defn, params)

        apply(__MODULE__, action, [conn, defn, params])
      end

      defp handle_before_filter(%{halted: true} = conn, _, _, _), do: conn
      defp handle_before_filter(conn, action, defn, params) do
        _handle_before_filter(conn, action, defn, params, defn.controller_filters[:before_filter])
      end
