<commit_before>= stylesheet_link_tag 'rails_admin/ra.history'
= javascript_include_tag 'rails_admin/diff_match_patch'
= javascript_include_tag 'rails_admin/jquery.pretty-text-diff'
= javascript_include_tag 'rails_admin/ra.history'

%table#history.table.table-condensed.table-striped
  %thead
    %tr
      %th.shrink.user= t("admin.table_headers.username")
      %th.shrink.items= t("admin.table_headers.item")
      %th.changes= t("admin.history_rollback.table_headers.changes")
      %th.rollback= t("admin.history_rollback.table_headers.rollback")
  %tbody
    - @history.each do |t|
      - abstract_model = RailsAdmin.config(t.table).abstract_model
      %tr
        %td= t.try :username
        - if o = abstract_model.try(:get, t.item)
          - label = o.send(abstract_model.config.object_label_method)
          - if show_action = action(:show, abstract_model, o)
            %td= link_to(label, url_for(action: show_action.action_name, model_name: abstract_model.to_param, id: o.id), class: 'pjax')
          - else
            %td= label
        - else
          - label = Object.const_defined?(t.table) ? t.table.constantize.model_name.human : t.table
          %td= "#{label} ##{t.item}"
        %td= t.message
        %td= link_to(t("admin.history_rollback.table_headers.view_changes"), "#", class: "changeset", :data => {:url => url_for(action: action(:history_index, abstract_model).action_name, model_name: abstract_model.to_param, version_id: t.version_id)})<commit_msg>Make access of action_name safer<commit_after>= stylesheet_link_tag 'rails_admin/ra.history'
= javascript_include_tag 'rails_admin/diff_match_patch'
= javascript_include_tag 'rails_admin/jquery.pretty-text-diff'
= javascript_include_tag 'rails_admin/ra.history'

%table#history.table.table-condensed.table-striped
  %thead
    %tr
      %th.shrink.user= t("admin.table_headers.username")
      %th.shrink.items= t("admin.table_headers.item")
      %th.changes= t("admin.history_rollback.table_headers.changes")
      %th.rollback= t("admin.history_rollback.table_headers.rollback")
  %tbody
    - @history.each do |t|
      - abstract_model = RailsAdmin.config(t.table).abstract_model
      %tr
        %td= t.try :username
        - if o = abstract_model.try(:get, t.item)
          - label = o.send(abstract_model.config.object_label_method)
          - if show_action = action(:show, abstract_model, o)
            %td= link_to(label, url_for(action: show_action.action_name, model_name: abstract_model.to_param, id: o.id), class: 'pjax')
          - else
            %td= label
        - else
          - label = Object.const_defined?(t.table) ? t.table.constantize.model_name.human : t.table
          %td= "#{label} ##{t.item}"
        %td= t.message
        %td
          -if history_action = action(:history_index, abstract_model)
            = link_to(t("admin.history_rollback.table_headers.view_changes"), "#", class: "changeset", :data => {:url => url_for(action: history_action.action_name, model_name: abstract_model.to_param, version_id: t.version_id)})
{'fraction_non_alphanumeric': 0.13603662524525834, 'fraction_numerical': 0.0, 'mean_word_length': 3.4656934306569345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6076194', 'n_tokens_mistral': 1043, 'n_tokens_neox': 1010, 'n_words': 160}