Created
November 25, 2016 20:11
-
-
Save basmoura/4bedaf6e9f311aa9634c6c9efecd0d4e 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
<%= simple_form_for(@car) do |f| %> | |
<% if @car.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@car.errors.count, "error") %> prohibited this car from being saved:</h2> | |
<ul> | |
<% @car.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<div class="form-group"> | |
<div class="row"> | |
<div class="col-md-6"> | |
<%= f.input :company, input_html: { class: 'form-control' } %> | |
</div> | |
<div class="col-md-6"> | |
<%= f.input :name, input_html: { class: 'form-control' } %> | |
</div> | |
</div> | |
</div> | |
<div class="form-group"> | |
<div class="row"> | |
<div class="col-md-6"> | |
<%= f.input :model, input_html: { class: 'form-control' } %> | |
</div> | |
<div class="col-md-6"> | |
<%= f.input :year, input_html: { class: 'form-control' } %> | |
</div> | |
</div> | |
</div> | |
<div class="form-group"> | |
<%= f.input :color, input_html: { class: 'form-control' } %> | |
</div> | |
<div class="form-group"> | |
<%= f.submit "Salvar", class: 'btn btn-success' %> | |
<%= link_to "Voltar", cars_path, class: "btn btn-link" %> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment