<commit_before>%table.form
  %tr
    %td
      Branch
    %td
      - if not @center.new?
        = select :name => 'center[branch_id]', :collection => Branch.all.map{|b| [b.id,b.name]}
      -elsif @branch and @center.new?
        = select :name => 'center[branch_id]', :collection => Branch.all(:id => @branch.id).map{|b| [b.id,b.name]}
      -else
        = select :name => 'center[branch_id]', :collection => Branch.all.map{|b| [b.id,b.name]}
  %tr
    %td
      Center name:
    %td
      = text_field :name, :size => 40
  %tr
    %td
      Center code:
    %td
      = text_field :code, :size => 2
      %br/
      %span.greytext a two letter unique code for the center
  %tr
    %td
      Meeting every:
    %td
      - options = [['none', '<none>']] + (Center.meeting_days.map { |x| [x.to_s, x.to_s.capitalize] })[1..-1]
      = select :meeting_day, :collection => options
      &nbsp;&nbsp;on&nbsp;&nbsp;
      = text_field :meeting_time_hours,   :size => 2
      %b :
      = text_field :meeting_time_minutes, :size => 2
      &nbsp;&nbsp;
      %span.greytext time is in a 24 hour format
  %tr
    %td
      Managed by:
    %td
      = select_staff_member_for @center, :manager
      %br/
      %span.greytext pick the staff member that manages this center
  =partial "centers/extra_fields"
  %tr
    %td
    %td
      = submit submit_text
      &nbsp;&nbsp;
      = link_to 'cancel', cancel_url
<commit_msg>Fixed edit of centers default selected branch<commit_after>%table.form
  %tr
    %td
      Branch
    %td
      - if @branch and not @center.new?
        =select :name => 'center[branch_id]', :collection => Branch.all.map{|b| [b.id,b.name]}, :selected => @branch.id.to_s
      -elsif @branch and @center.new?
        =select :name => 'center[branch_id]', :collection => Branch.all(:id => @branch.id).map{|b| [b.id,b.name]}
      -else
        =select :name => 'center[branch_id]', :collection => Branch.all.map{|b| [b.id,b.name]}
  %tr
    %td
      Center name:
    %td
      = text_field :name, :size => 40
  %tr
    %td
      Center code:
    %td
      = text_field :code, :size => 2
      %br/
      %span.greytext a two letter unique code for the center
  %tr
    %td
      Meeting every:
    %td
      - options = [['none', '<none>']] + (Center.meeting_days.map { |x| [x.to_s, x.to_s.capitalize] })[1..-1]
      = select :meeting_day, :collection => options
      &nbsp;&nbsp;on&nbsp;&nbsp;
      = text_field :meeting_time_hours,   :size => 2
      %b :
      = text_field :meeting_time_minutes, :size => 2
      &nbsp;&nbsp;
      %span.greytext time is in a 24 hour format
  %tr
    %td
      Managed by:
    %td
      = select_staff_member_for @center, :manager
      %br/
      %span.greytext pick the staff member that manages this center
  =partial "centers/extra_fields"
  %tr
    %td
    %td
      = submit submit_text
      &nbsp;&nbsp;
      = link_to 'cancel', cancel_url

{'fraction_non_alphanumeric': 0.1519422481952561, 'fraction_numerical': 0.006187693365417669, 'mean_word_length': 2.3257142857142856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 30, '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': '4607396', 'n_tokens_mistral': 1070, 'n_tokens_neox': 1039, 'n_words': 260}