Skip to content

Commit

Permalink
fix: add show fields in gen.live (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarlah authored Nov 26, 2023
1 parent 1df8b7b commit 560fa66
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions priv/templates/ash_phoenix.gen.live/show.ex.eex
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ defmodule <%= inspect Module.concat(@web_module, @resource_alias) %>Live.Show do
<% end %>
</.header>

<.list>
<%= for attribute <- @attrs do %>
<:item title="<%= Phoenix.Naming.humanize(attribute.name) %>"><%%= @<%= @resource_singular %>.<%= attribute.name %> %></:item>
<% end %>
</.list>

<.back navigate={~p"<%= @route_prefix %>"}>Back to <%= @resource_plural %></.back>

<%= if @update_action do %>
Expand Down

0 comments on commit 560fa66

Please sign in to comment.