<%= form_with(model: user) do |f| %> <%= render "shared/errors", object: user %> <%= f.label :name %> <%= f.text_field :name, autofocus: true %> <%= f.label :email %> <%= f.email_field :email %> <%= f.label :password %> <%= f.password_field :password %> <%= f.label :password_confirmation, "Confirm Password" %> <%= f.password_field :password_confirmation %> <% if user.new_record? %> <%= f.submit "Create Account" %> <% else %> <%= f.submit "Update Account" %> <% end %> <% end %>