You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
1.8 KiB

<div>
<h1 class="font-bold text-4xl">Form with strong parameters</h1>
<%= form_with url: update_strong_path, class:"bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4" do |form| %>
<div class="mb-4">
<%= form.label :name, "Name:", class:"block text-gray-700 text-sm font-bold mb-2" %>
</div>
<div class="mb-6">
<%= form.text_field 'strong[name]', class:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" %>
</div>
<div class="mb-4">
<%= form.label :surname, "Surname:", class:"block text-gray-700 text-sm font-bold mb-2" %>
</div>
<div class="mb-6">
<%= form.text_field 'strong[surname]', class:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" %>
</div>
<div class="flex flex-wrap -mx-3 mb-6">
<div class="w-full md:w-1/2 px-3 mb-6 md:mb-0">
<%= form.label :birth_date, "Birth Date:", class:"block text-gray-700 text-sm font-bold mb-2" %>
<%= form.text_field 'strong[birth][date]', class:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" %>
</div>
<div class="w-full md:w-1/2 px-3">
<%= form.label :birth_location, "Birth Location:", class:"block text-gray-700 text-sm font-bold mb-2" %>
<%= form.text_field 'strong[birth][location]', class:"shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" %>
</div>
</div>
<div class="flex items-center justify-between">
<%= form.submit class:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline" %>
</div>
<% end %>
</div>