Last active
August 29, 2015 14:18
-
-
Save Pinwheeler/063be0ba0d7a58c544be 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 :monster do |f| %> | |
<% if @monster.errors.any? %> | |
<div id="error_explanation"> | |
<h2> | |
<%= pluralize(@monster.errors.count, "error") %> prohibited this monster from being saved: | |
</h2> | |
<ul> | |
<% @monster.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<p> | |
<%= f.label :name %><br> | |
<%= f.text_field :name %> | |
</p> | |
<p> | |
<%= f.label :cr %><br> | |
<%= f.text_field :cr %> | |
</p> | |
<p> | |
<%= f.label :terrain %><br> | |
<% fields_for :terrain do |terrain_fields| %> | |
<% terrain_fields.check_box :name %> | |
<% end %> | |
</p> | |
<p> | |
<%= f.submit %> | |
</p> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment