<%= form_with(model: customer, local: true) do |form| %> <% if customer.errors.any? %>

<%= pluralize(customer.errors.count, "error") %> prohibited this customer from being saved:

<% end %> <%= form.hidden_field :user_id %> <% if @customer_type == "Corporate" %> <%= render "corporate" %> <% elsif @customer_type == "Individual" %> <%= render "individual" %> <% else %>
<%= form.label :customer_type_id, "Select whether you are applying for an Individual or Corporate", :class=>"lead" %> <%= form.select :customer_type_id, CustomerType.all.collect {|s| [s.name, s.id]}, {:prompt => 'Select Type'}, data: { remote: true, url: url_for( action: :form_by_customer_type)}, :class => 'form-control' %>
<% end %> <% end %>