Skip to content

Instantly share code, notes, and snippets.

@axilaris
Created March 15, 2014 12:50
Show Gist options
  • Select an option

  • Save axilaris/9566708 to your computer and use it in GitHub Desktop.

Select an option

Save axilaris/9566708 to your computer and use it in GitHub Desktop.
<%= form_for(@country) do |f| %>
<% if @country.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@country.errors.count, "error") %> prohibited this country from being saved:</h2>
<ul>
<% @country.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div id="demo-form" class="demo-description" style="display: none; ">
<p>
The basic dialog window is an overlay positioned within the viewport and is protected from page content
(like select elements) shining through with an iframe. It has a title bar and a content area, and can be moved,
resized and closed with the 'x' icon by default.
</p>
</div>
<%= link_to_modal "Demo Form", "#demo-form", :class=>"button" %>
<div class="field">
<%= f.label :name %><br>
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :country_code %><br>
<%= f.text_field :country_code %>
</div>
<div class="field">
<%= f.label :currency_name %><br>
<%= f.text_field :currency_name %>
</div>
<div class="field">
<%= f.label :currency_code %><br>
<%= f.text_field :currency_code %>
</div>
<div class="field">
<%= f.label :rate %><br>
<%= f.text_field :rate %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>
@axilaris
Copy link
Copy Markdown
Author

has this error in browser console instead
GET http://localhost:3000/images/close 404 (Not Found)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment