Created
March 14, 2014 04:11
-
-
Save axilaris/9542040 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(@post) do |f| %> | |
<% if @post.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@post.errors.count, "error") %> prohibited this post from being saved:</h2> | |
<ul> | |
<% @post.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<select id="simple-example" name="people"><option value="6">Brittney</option> | |
<option value="4">Eric</option> | |
<option value="7">Fred</option> | |
<option value="1">Jason</option> | |
<option value="2">Mike</option> | |
<option value="5">Nick</option> | |
<option value="3">Paige</option></select> | |
<div class="field"> | |
<%= f.label :comment %><br> | |
<%= f.text_field :comment %> | |
</div> | |
<div class="actions"> | |
<%= f.submit :class => "btn btn-primary" %> | |
</div> | |
<% end %> | |
<% content_for :js do %> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('select#simple-example').select2(); | |
}); | |
</script> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment