Sha256: a223f29dc5280c197d631bca6a5668fdaf87d23d9cd2755bab149a55828bf587

Contents?: true

Size: 805 Bytes

Versions: 29

Compression:

Stored size: 805 Bytes

Contents

module ThecoreSettings
  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

29 entries across 29 versions & 1 rubygems

Version Path
thecore_ui_rails_admin-2.7.7 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.7.5 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.7.4 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.7.3 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.7.2.pre.test lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.7.1 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.7.0 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.6.3 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.6.2 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.6.1 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.6.0 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.10 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.9 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.8 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.7 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.6 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.5 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.4 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.3 lib/concerns/rails_admin_requirements.rb
thecore_ui_rails_admin-2.5.2 lib/concerns/rails_admin_requirements.rb