Sha256: 2e2ee8629f1b5af40f206aee36d7babb511ab56744815a6ace4314e9eb30d34a
Contents?: true
Size: 1.14 KB
Versions: 3
Compression:
Stored size: 1.14 KB
Contents
<%%= form_with(model: @<%= singular_table_name %>, local: true) do |f| %> <%%= errors_for(@<%= singular_table_name %>) %> <% attributes.each do |attribute| -%> <%- if attribute.field_type == :check_box %> <div class="mb-4 flex items-start"> <div class="flex items-center h5"> <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, class: 'focus:ring-2 focus:ring-indigo-500:focus ring-offset-2 h-4 w-4 text-indigo-600 border-gray-300 rounded' %> </div> <div class="ml-3 text-sm"> <%%= f.label :<%= attribute.name %>, class: 'text-sm font-medium text-gray-600' %> </div> </div> <%- else -%> <div class="mb-4"> <%%= f.label :<%= attribute.name %>, class: 'text-sm font-medium text-gray-600' %> <%%= f.<%= attribute.field_type %> :<%= attribute.name %>, class: 'shadow appearance-none border border-gray-300 rounded w-full py-2 px-3 bg-white focus:outline-none focus:ring-0 focus:border-blue-500 text-gray-400 leading-6 transition-colors duration-200 ease-in-out' %> </div> <% end -%> <% end -%> <%%= f.submit class: 'my-2 bg-blue-500 hover:bg-blue-700 text-white font-bold text-sm py-2 px-4 rounded w-full' %> <%% end -%>
Version data entries
3 entries across 3 versions & 1 rubygems