diff --git a/lib/mix/tasks/torch.gen.html.ex b/lib/mix/tasks/torch.gen.html.ex
index bfac2136..c19827c7 100644
--- a/lib/mix/tasks/torch.gen.html.ex
+++ b/lib/mix/tasks/torch.gen.html.ex
@@ -21,14 +21,11 @@ defmodule Mix.Tasks.Torch.Gen.Html do
Mix.Torch.ensure_phoenix_is_loaded!("torch.gen.html")
- phoenix_version = to_string(Application.spec(:phoenix, :vsn))
-
- # Check for Phoenix 1.6+ with Phoenix.HTML 3+ and Heex
template_format =
- cond do
- format == "slime" -> format
- Version.match?(phoenix_version, ">= 1.6.0-rc.0", allow_pre: true) -> "heex"
- true -> "eex"
+ if format == "slime" do
+ format
+ else
+ "heex"
end
# First, backup the projects existing templates if they exist
diff --git a/priv/templates/common/phx.gen.html/controller.ex b/priv/templates/common/phx.gen.html/controller.ex
index 2348cd72..3f024924 100644
--- a/priv/templates/common/phx.gen.html/controller.ex
+++ b/priv/templates/common/phx.gen.html/controller.ex
@@ -4,12 +4,8 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
alias <%= inspect context.module %>
alias <%= inspect schema.module %>
- <%= if Version.match?(to_string(Application.spec(:phoenix, :vsn)), "< 1.5.0") do %>
- plug(:put_layout, {<%= inspect context.web_module %>.LayoutView, "torch.html"})
- <% else %>
plug(:put_root_layout, {<%= inspect context.web_module %>.LayoutView, "torch.html"})
plug(:put_layout, false)
- <% end %>
def index(conn, params) do
case <%= inspect context.alias %>.paginate_<%= schema.plural %>(params) do