Sha256: d0815ea5fdeaf87e7cbea86aa720bce5b97fbd1f62af5336c3824139211c9e58

Contents?: true

Size: 808 Bytes

Versions: 39

Compression:

Stored size: 808 Bytes

Contents

module RailsAdminSettings
  module RailsAdminExtensionConfig
    def self.included(base)
      # IMPORTANT: To extend rails admin section in model, directly, instead of using concerns, I can
      # extend the included method. Be sure to use a different module name, otherwis it will be overwritten
      # See thecore_settings_rails_admin_model_extensions.rb initializer for a reference
      # on how to extend rails_admin section of a model previously defined (say it's defined in another gem)
      if base.respond_to?(:rails_admin)
        base.rails_admin do
          navigation_icon 'fa fa-cogs'
        end
      end

      def display_name
        "#{I18n.t "settings.namespaces.#{ns}", default: ns.titleize}: #{I18n.t "settings.names.#{name}", default: name.titleize}"
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
thecore_ui_rails_admin-2.4.2 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.4.1 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.4.0 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.3.7 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.3.6 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.3.5 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.3.4 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.3.3 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.3.2 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.3.1 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.3.0 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.12 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.11 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.10 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.9 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.8 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.7 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.6 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.5 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.2.4 lib/concerns/rails_admin_requirements.rb