= form_for( @<%= class_name.demodulize.underscore %>, html: { class: "form-vertical" }, role: "form" ) do |f| fieldset legend strong = @<%= class_name.demodulize.underscore %>.new_record? ? 'Cadastrar' : 'Editar' ' <%= class_name.demodulize.underscore %> .form-group .row <% attributes.each do |attribute| %> .col-sm-4 = f.label :<%= attribute.name %>, class: "control-label" = f.<%= attribute.field_type %> :<%= attribute.name %>, class: "form-control" <%= ", maxlength: #{attribute.attr_options[:limit]}" if attribute.attr_options[:limit] %> = error_for @<%= class_name.demodulize.underscore %>, :<%= attribute.name %> <% end %> .form-group h6 ' (*) Campos Obrigatórios .form-actions .row .col-sm-12 = f.submit "Salvar", class: "btn btn-primary" = link_to "Cancelar", <%= index_helper %>_path, class: "btn btn-default"