<commit_before>ActiveAdmin.register Mirror do

  permit_params :name, :family_id, :on

  config.sort_order = 'name_asc'

  index do
    id_column

    column :family
    column :name
    column :on
    column :created_at
    column :updated_at

    actions
  end

  form do |f|
    f.inputs do
      if f.object.new_record?
        f.input :family, hint: "Family not in the list? Add one #{link_to 'here',  new_admin_family_path}.".html_safe
      else
        f.input :family, include_blank: false
      end
      f.input :name
      f.input :on, as: :radio
    end

    f.actions
  end
end<commit_msg>Add open mirror link to admin<commit_after>ActiveAdmin.register Mirror do

  permit_params :name, :family_id, :on

  config.sort_order = 'name_asc'

  index do
    id_column

    column :family
    column :name
    column :on
    column :created_at
    column :updated_at

    column :url do |mirror|
      link_to 'Öppna', mirror_path(mirror), target: '_blank'
    end

    actions
  end

  form do |f|
    f.inputs do
      if f.object.new_record?
        f.input :family, hint: "Family not in the list? Add one #{link_to 'here',  new_admin_family_path}.".html_safe
      else
        f.input :family, include_blank: false
      end
      f.input :name
      f.input :on, as: :radio
    end

    f.actions
  end
end
{'fraction_non_alphanumeric': 0.08636363636363636, 'fraction_numerical': 0.0, 'mean_word_length': 2.41343669250646, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4396965', 'n_tokens_mistral': 460, 'n_tokens_neox': 444, 'n_words': 134}