 
   def show(conn, defn, params) do
     model = defn.__struct__
-
-    resource = if Application.get_all_env(:auth_ex) != [] do
-      resource_name = AuthEx.Utils.resource_name conn, model: defn.resource_model
-      case conn.assigns[resource_name] do
-        nil ->
-          model.run_query(repo, defn, :show, params[:id])
-        res ->
-          res
-      end
-    else
-      model.run_query(repo, defn, :show, params[:id])
-    end
+    resource = model.run_query(repo, defn, :show, params[:id])
 
     if resource == nil do
       raise Phoenix.Router.NoRouteError, conn: conn, router: __MODULE__


  def destroy(conn, defn, params) do
    model = defn.__struct__
    resource_model = model.__struct__.resource_model
    |> base_name |> String.downcase |> String.to_atom

    resource = model.run_query(repo, defn, :edit, params[:id])


  end

  def batch_action(conn, defn, %{batch_action: "destroy"} = params) do
    resource_model = defn.resource_model

    type = case ExAdmin.Schema.primary_key(resource_model) do
      nil -> :integer
