aboutsummaryrefslogtreecommitdiffstats
path: root/actiontext/test/dummy/app/views/messages/_form.html.erb
blob: 3b8a17488400899a44188505bfaf79713410ae21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<%= form_with(model: message, local: true) do |form| %>
  <% if message.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(message.errors.count, "error") %> prohibited this message from being saved:</h2>

      <ul>
      <% message.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= form.label :subject %>
    <%= form.text_field :subject %>
  </div>

  <div class="field">
    <%= form.label :content %>
    <%= form.rich_text_area :content, class: "trix-content" %>
  </div>

  <div class="actions">
    <%= form.submit %>
  </div>
<% end %>