<commit_before>%h1 Credits
%hr

%h2 Add Credit
= error_messages_for :credit
- form_for :credit, @credit, :url => admin_credits_path do |f|
  = f.select(:user_id, @users.collect {|u| [ u.full_name, u.id ] }, { :include_blank => true })
  = f.label :description
  = f.text_field :description
  = f.label :amount
  $
  = f.text_field :amount
  = image_submit_tag image_path('add.png')


%h2 History
%table
  %tr
    %th Name
    %th Amount
    %th Description
  - if @credits.empty?
    %tr.notice
      %td{:colspan => 3} No records found
  - @credits.each do |credit|
    %tr
      %td= credit.user.full_name
      %td= number_to_currency(credit.amount)
      %td= credit.description<commit_msg>hiding non existing users<commit_after>%h1 Credits
%hr

%h2 Add Credit
= error_messages_for :credit
- form_for :credit, @credit, :url => admin_credits_path do |f|
  = f.select(:user_id, @users.collect {|u| [ u.full_name, u.id ] }, { :include_blank => true })
  = f.label :description
  = f.text_field :description
  = f.label :amount
  $
  = f.text_field :amount
  = image_submit_tag image_path('add.png')


%h2 History
%table
  %tr
    %th Name
    %th Amount
    %th Description
  - if @credits.empty?
    %tr.notice
      %td{:colspan => 3} No records found
  - @credits.each do |credit|
    - unless credit.blank? || credit.user.blank?
      %tr
        %td= credit.user.full_name
        %td= number_to_currency(credit.amount)
        %td= credit.description
{'fraction_non_alphanumeric': 0.13726835964310227, 'fraction_numerical': 0.00549073438572409, 'mean_word_length': 3.130311614730878, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4214488', 'n_tokens_mistral': 554, 'n_tokens_neox': 539, 'n_words': 125}