Files
test_rails_kaungkaung/app/views/tasks/new.html.erb
2026-01-27 16:50:25 +06:30

22 lines
527 B
Plaintext

<h3>Add new task for "<%= @project.project_name %>"</h3>
<%= form_with model: [@project, Task.new], local: true do |task| %>
<p>
<%= task.label :title %><br>
<%= task.text_field :title %>
<% @project.tasks.each do |t| %>
<% t.errors.full_messages_for(:title).each do |message| %>
<p><%= message %></p>
<% end %>
<% end %>
</p>
<p>
<%= task.label :status %><br>
<%= task.select :status, Task.statuses.keys %>
</p>
<p>
<%= task.submit "Create Task" %>
</p>
<% end %>