mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 08:46:41 +01:00
26 lines
610 B
Plaintext
26 lines
610 B
Plaintext
<%= form_for(@problem) do |f| %>
|
|
<% if @problem.errors.any? %>
|
|
<div id="error_explanation">
|
|
<h2><%= pluralize(@problem.errors.count, "error") %> prohibited this problem from being saved:</h2>
|
|
|
|
<ul>
|
|
<% @problem.errors.full_messages.each do |message| %>
|
|
<li><%= message %></li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="field">
|
|
<%= f.label :title %><br>
|
|
<%= f.text_field :title %>
|
|
</div>
|
|
<div class="field">
|
|
<%= f.label :content %><br>
|
|
<%= f.text_area :content %>
|
|
</div>
|
|
<div class="actions">
|
|
<%= f.submit %>
|
|
</div>
|
|
<% end %>
|