app/views/parents/_form.html.erb
<%= render "layouts/navbar" %>
<%= form_for (@parent) do |f| %>
<% if @parent.errors.any? %>
<div class="container">
<div class="text-danger">
<div id="error_explanation">
<h2 class=""><%= pluralize(@parent.errors.count, "erro") %> proibiram este formulario de ser salvo:</h2>
<ul>
<% @parent.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
</div>
</div>
<% end %>
<div class="form-group">
<%= f.label :name, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-user"></span>
Nome
</span>
<%= f.text_field :name, class:"form-control", placeholder:"Nome do usuário" %>
</div>
</div>
<div class="form-group">
<%= f.label :parent_cpf, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">CPF</span>
<%= f.text_field :parent_cpf, class:"form-control cpf active", placeholder:"Somente números."%>
</div>
<p>
<small class="text-muted text-lowercase sr-only">(somente numeros)</small>
</p>
</div>
<div class="form-group">
<%= f.label :address, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-home"></span>
Endereço
</span>
<%= f.text_field :address, class:"form-control", placeholder:"Ex.: Rua do limoeiro, casa 53" %>
</div>
</div>
<div class="form-group">
<%= f.label :phone, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-phone"></span>
Telefone
</span>
<%= f.text_field :phone, class:"form-control", placeholder:"Somente numeros com DDD." %>
</div>
</div>
<div class="form-group">
<%= f.label :birth_date, class:"sr-only" %>
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-gift"></span>
Data de nascimento
</span>
<%= f.date_field :birth_date, class:"form-control", placeholder:"Ex.: dd/mm/aaaa" %>
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-addon">
<span class="fa fa-venus-mars"></span>
Sexo
</span>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-radio" name="btn1">
<%= f.radio_button(:gender,"Feminino") %> Feminino
</label>
<label class="btn btn-radio" name="btn2">
<%= f.radio_button(:gender,"Masculino") %> Masculino
</label>
</div>
</div>
</div>
<%= f.button '<span class="fa fa-check"></span> Salvar'.html_safe, type:"submit", class:'btn btn-lg btn-success' %>
<% end %>