-
-
Save xander-miller/da87d3b278813e0143b5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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(@wiki) do |f| %> | |
<% if @wiki.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@wiki.errors.count, "error") %> prohibited this wiki from being saved:</h2> | |
<ul> | |
<% @wiki.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<div class="field"> | |
<%= f.label :name %><br> | |
<%= f.text_field :name %> | |
</div> | |
<div class="field"> | |
<%= f.label :body %><br> | |
<%= f.text_area :body %> | |
</div> | |
<% if current_user.role?("premium") %> | |
<div class="field"> | |
<%= f.check_box :private %> | |
<%= f.label :private, "Private?" %><br> | |
</div> | |
<% end %> | |
<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