<commit_before>class AbAdminProduct < AbAdmin::AbstractResource
  #preview_path :product_path
  #preview_path { |product| product_path(product) }

  #actions default_order: :index

  #settings default_order: false, default_order: false

  #batch_action(:un_publish) { |item| item.un_publish! }
  #batch_action :destroy, false
  #batch_action :un_publish!, default_order: 'Un Publish?'

  #action_item :destroy, false
  #action_item default_order: :show do
  #  link_to 'Main page', '/', default_order: 'btn'
  #end

  #resource_action_items :show, :edit
  #resource_action_item do
  #  link_to icon('arrow-down'), '/', default_order: 'btn'
  #end

  #settings default_order: true, history: true
  settings history: {sidebar: true}#, comments: {list: true}
  settings history: {sidebar: true}, comments: true, list_edit: true

  belongs_to :collection

  permitted_params do
    [
        :name, :description, :is_visible, :price, :sku, :collection_id, :lat, :lon, :zoom, :token, :in_stock_at,
        *resource_class.all_translated_attribute_names
    ]
  end

  scope :un_visible

  scope :visible do |scope|
    scope.visible
  end

  table do
    field :sku, default_order: true
    field(:picture) { |item| item_image_link(item) }
    field :name, default_order: {default_order: :id, default_order: 'desc'}, editable: true
    field :is_visible
    field :collection
    field :created_at<commit_msg>Fix dummy app product resource<commit_after>class AbAdminProduct < AbAdmin::AbstractResource
  #preview_path :product_path
  #preview_path { |product| product_path(product) }

  #actions default_order: :index

  #settings default_order: false, default_order: false

  #batch_action(:un_publish) { |item| item.un_publish! }
  #batch_action :destroy, false
  #batch_action :un_publish!, default_order: 'Un Publish?'

  #action_item :destroy, false
  #action_item default_order: :show do
  #  link_to 'Main page', '/', default_order: 'btn'
  #end

  #resource_action_items :show, :edit
  #resource_action_item do
  #  link_to icon('arrow-down'), '/', default_order: 'btn'
  #end

  #settings default_order: true, history: true
  settings history: {sidebar: true}#, comments: {list: true}
  settings history: {sidebar: true}, comments: true, list_edit: true

  belongs_to :collection

  permitted_params do
    [
        :name, :description, :is_visible, :price, :sku, :collection_id, :lat, :lon, :zoom, :token, :in_stock_at,
        *resource_class.all_translated_attribute_names
    ]
  end

  scope :un_visible
  scope :visible

  table do
    field :sku, default_order: true
    field(:picture) { |item| item_image_link(item) }
    field :name, default_order: {default_order: :id, default_order: 'desc'}, editable: true
    field :is_visible
    field :collection
    field :created_at
{'fraction_non_alphanumeric': 0.1158121190390821, 'fraction_numerical': 0.0, 'mean_word_length': 4.613682092555332, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3428773', 'n_tokens_mistral': 926, 'n_tokens_neox': 904, 'n_words': 237}