Created
June 13, 2016 04:27
-
-
Save bnorberg/9b043408d7189aa781372dc651a3cebd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= form_for(@topic) do |f| %> | |
<% if @topic.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@topic.errors.count, "error") %> prohibited this topic from being saved:</h2> | |
<ul> | |
<% @topic.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 :description %><br> | |
<%= f.text_area :description %> | |
</div> | |
<div class="actions"> | |
<%= f.submit %> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment