Sha256: 24f91f89a817d0784469e16eddd7d411c390533340bfad128a8262540a758217

Contents?: true

Size: 690 Bytes

Versions: 3

Compression:

Stored size: 690 Bytes

Contents

require 'model_base'

module ModelBase
  class Configuration
    include ActiveSupport::Configurable

    config_accessor(:disabled){ false }

    base_exclusions =
      [
        /.*_checksum/,
        /.*_count/,
      ] + %w[_id _type id]

    config_accessor(:excluded_columns_of_show) do
      base_exclusions
    end

    config_accessor(:excluded_columns_of_index) do
      base_exclusions + %w[updated_at]
    end

    config_accessor(:excluded_columns_of_form) do
      base_exclusions + %w[created_at updated_at]
    end

    config_accessor(:title_column_candidates) do
      ['name', 'title', 'email', 'display_name', 'display_title', /_name\z/, /_title\z/]
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
model_base_generators-0.2.2 lib/model_base/config.rb
model_base_generators-0.2.1 lib/model_base/config.rb
model_base_generators-0.2.0 lib/model_base/config.rb