<commit_before>%input{:type => :hidden, :id =>'page_identifier', :value => "admin/users.#{@user.id}.edit"}

%h1
  Admin user edit - 
  - @user.firstname

=form_for :user, :url => admin_user_path(@user), :html => { :method => :put } do |form|
  = label :user, :email
  = form.text_field :email

  = label :user, :role
  = form.select :role, ['student', 'supervisor', 'admin'], :selected => (['student', 'supervisor', 'admin'])[@user.role]

  = form.submit "Update user"

%p
  %a{:href => admin_usermanagement_index_path }
    Back
  to user management<commit_msg>Nicer roles String names, int values, autoselect current value<commit_after>%input{:type => :hidden, :id =>'page_identifier', :value => "admin/users.#{@user.id}.edit"}

%h1
  Admin user edit - 
  - @user.firstname

=form_for :user, :url => admin_user_path(@user), :html => { :method => :put } do |form|
  = label :user, :email
  = form.text_field :email

  = label :user, :role
  = form.select :role, options_for_select([['student', 0], ['supervisor', 1], ['admin', 2]], @user.role)
  = form.submit "Update user"

%p
  %a{:href => admin_usermanagement_index_path }
    Back
  to user management
{'fraction_non_alphanumeric': 0.1903114186851211, 'fraction_numerical': 0.004325259515570935, 'mean_word_length': 4.483412322274882, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7132570', 'n_tokens_mistral': 418, 'n_tokens_neox': 413, 'n_words': 101}