<commit_before>module RailsAdmin
  module Models
    module Setup
      module ForeignNotificationAdmin
        extend ActiveSupport::Concern

        included do
          rails_admin do |c|
            object_label_method { :label }
            navigation_label 'Workflows'
            label 'Notification'
            weight 500

            edit do
              field :name, :string do
                required true
              end

              field :active, :boolean do
                visible do
                  ctrl = bindings[:controller]
                  model_name = ctrl.instance_variable_get(:@model_name)
                  bindings[:object].data_type ||= ctrl.instance_variable_get(:@data_type_filter)
                  bindings[:object].data_type ||= ctrl.object if model_name == 'Setup::JsonDataType'
                  bindings[:object].data_type != nil
                end<commit_msg>hide notification in navigation menu<commit_after>module RailsAdmin
  module Models
    module Setup
      module ForeignNotificationAdmin
        extend ActiveSupport::Concern

        included do
          rails_admin do |c|
            object_label_method { :label }
            visible false
            navigation_label 'Workflows'
            label 'Notification'
            weight 500

            edit do
              field :name, :string do
                required true
              end

              field :active, :boolean do
                visible do
                  ctrl = bindings[:controller]
                  model_name = ctrl.instance_variable_get(:@model_name)
                  bindings[:object].data_type ||= ctrl.instance_variable_get(:@data_type_filter)
                  bindings[:object].data_type ||= ctrl.object if model_name == 'Setup::JsonDataType'
                  bindings[:object].data_type != nil
                end
{'fraction_non_alphanumeric': 0.0664167113015533, 'fraction_numerical': 0.0032137118371719335, 'mean_word_length': 1.6272855133614628, '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': '3433100', 'n_tokens_mistral': 457, 'n_tokens_neox': 420, 'n_words': 109}