tabletop-companion/app/views/characters/_form.html.erb

18 lines
596 B
Plaintext

<%# locals: (button_text:) -%>
<%= form_with model: @character do |f| %>
<%= f.label :name %>
<%= f.text_field :name%>
<%= display_form_errors(@character, :name) %>
<%= f.label :game_system_id %>
<%= f.collection_select :game_system_id, GameSystem.all, :id, :name, required: true, include_blank: " " %>
<%= display_form_errors(@character, :game_system) %>
<%= f.label :table_id %>
<%= f.collection_select :table_id, Current.user.tables, :id, :name, required: true, include_blank: " " %>
<%= display_form_errors(@character, :table) %>
<%= f.submit button_text %>
<% end %>