Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Evanto/8aec9a7c0a7d105467329c6634f0668d to your computer and use it in GitHub Desktop.
Save Evanto/8aec9a7c0a7d105467329c6634f0668d to your computer and use it in GitHub Desktop.
<h1>Добавить карточку</h1>
<%= simple_form_for Card.new do |f| %>
<% if Card.new.errors.any? %>
<% Card.new.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
<% end %>
<p><%= f.label "* Вопрос:" %></p>
<p><%= f.input :original_text, label: false, placeholder: "не больше 200 символов" %></p>
<p><%= f.label "* Ответ:" %></p>
<p><%= f.input :translated_text, label: false, placeholder: "не больше 200 символов" %></p>
<p><% f.date_field :review_date %><br>
<p><%= f.button :submit, "Создать" %></p>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment