<commit_before>module CommonViews
  module Helpers

    IGNORED_COLUMNS = %w(id created_at updated_at)
    TEMPLATE_PATH = 'common_views'

    # def full_title(page_title)
    #   t("title") + (" | #{page_title}" unless page_title.blank?).to_s
    # end

    def form_standard_buttons_tag(f, controller)
      render "#{TEMPLATE_PATH}/form_standard_buttons_tag", f: f, controller: controller
    end

    def table_standard_buttons_tag(element, render_method = "render")
      edit_path ||= send("edit_#{element.class.name.underscore}_path", element)

      send(render_method, partial: "#{TEMPLATE_PATH}/table_standard_buttons_tag", formats: [:html],
        locals: { element: element, edit_path: edit_path })
    end

    def create_button_for(type, title = 'Dodaj')
      render "#{TEMPLATE_PATH}/create_button_for", type: type, title: title if can? :create, type
    end

    def simple_table_for(items)
      render "#{TEMPLATE_PATH}/simple_table_for", items: items
    end
<commit_msg>zabieranie helperów<commit_after>module CommonViews
  module Helpers

    IGNORED_COLUMNS = %w(id created_at updated_at)
    TEMPLATE_PATH = 'common_views'

    def table_standard_buttons_tag(element, render_method = "render")
      edit_path ||= send("edit_#{element.class.name.underscore}_path", element)

      send(render_method, partial: "#{TEMPLATE_PATH}/table_standard_buttons_tag", formats: [:html],
        locals: { element: element, edit_path: edit_path })
    end

    def simple_table_for(items)
      render "#{TEMPLATE_PATH}/simple_table_for", items: items
    end

{'fraction_non_alphanumeric': 0.11259541984732824, 'fraction_numerical': 0.0, 'mean_word_length': 4.350340136054422, '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': '7528523', 'n_tokens_mistral': 526, 'n_tokens_neox': 511, 'n_words': 103}