lib/generators/active_admin/install/templates/active_admin.rb.erb in activeadmin-3.2.5 vs lib/generators/active_admin/install/templates/active_admin.rb.erb in activeadmin-4.0.0.beta1
- old
+ new
@@ -1,25 +1,15 @@
ActiveAdmin.setup do |config|
# == Site Title
#
# Set the title that is displayed on the main layout
- # for each of the active admin pages.
+ # for each of the active admin pages. Can also be customized
+ # by extracting the _site_header partial into your project
+ # to use your own logo, styles, etc.
#
config.site_title = "<%= Rails.application.class.name.split("::").first.titlecase %>"
- # Set the link url for the title. For example, to take
- # users to your main site. Defaults to no link.
- #
- # config.site_title_link = "/"
-
- # Set an optional image to be displayed for the header
- # instead of a string (overrides :site_title)
- #
- # Note: Aim for an image that's 21px high so it fits in the header.
- #
- # config.site_title_image = "logo.png"
-
# == Load Paths
#
# By default Active Admin files go inside app/admin/.
# You can change this directory.
#
@@ -76,12 +66,14 @@
# == User Authorization
#
# Active Admin will automatically call an authorization
# method in a before filter of all controller actions to
# ensure that there is a user with proper rights. You can use
- # CanCanAdapter or make your own. Please refer to documentation.
+ # CanCanAdapter, PunditAdapter, or make your own. Please
+ # refer to the documentation.
# config.authorization_adapter = ActiveAdmin::CanCanAdapter
+ # config.authorization_adapter = ActiveAdmin::PunditAdapter
# In case you prefer Pundit over other solutions you can here pass
# the name of default policy class. This policy will be used in every
# case when Pundit is unable to find suitable policy.
# config.pundit_default_policy = "MyDefaultPunditPolicy"
@@ -114,22 +106,16 @@
#
# Active Admin displays a logout link on each screen. These
# settings configure the location and method used for the link.
#
# This setting changes the path where the link points to. If it's
- # a string, the strings is used as the path. If it's a Symbol, we
+ # a string, the string is used as the path. If it's a Symbol, we
# will call the method to return the path.
#
# Default:
config.logout_link_path = :destroy_<%= @underscored_user_name %>_session_path
- # This setting changes the http method used when rendering the
- # link. For example :get, :delete, :put, etc..
- #
- # Default:
- # config.logout_link_method = :get
-
# == Root
#
# Set the action to call for the root path. You can set different
# roots for each namespace.
#
@@ -185,27 +171,10 @@
# You can run `bin/rails runner 'puts I18n.t("date.formats")'` to see the
# available formats in your application.
#
config.localize_format = :long
- # == Setting a Favicon
- #
- # config.favicon = 'favicon.ico'
-
- # == Meta Tags
- #
- # Add additional meta tags to the head element of active admin pages.
- #
- # Add tags to all pages logged in users see:
- # config.meta_tags = { author: 'My Company' }
-
- # By default, sign up/sign in/recover password pages are excluded
- # from showing up in search engine results by adding a robots meta
- # tag. You can reset the hash of meta tags included in logged out
- # pages:
- # config.meta_tags_for_logged_out_pages = {}
-
# == Removing Breadcrumbs
#
# Breadcrumbs are enabled by default. You can customize them for individual
# resources or you can disable them globally from here.
#
@@ -216,25 +185,10 @@
# Create another checkbox is disabled by default. You can customize it for individual
# resources or you can enable them globally from here.
#
# config.create_another = true
- # == Register Stylesheets & Javascripts
- #
- # We recommend using the built in Active Admin layout and loading
- # up your own stylesheets / javascripts to customize the look
- # and feel.
- #
- # To load a stylesheet:
- # config.register_stylesheet 'my_stylesheet.css'
- #
- # You can provide an options hash for more control, which is passed along to stylesheet_link_tag():
- # config.register_stylesheet 'my_print_stylesheet.css', media: :print
- #
- # To load a javascript file:
- # config.register_javascript 'my_javascript.js'
-
# == CSV options
#
# Set the CSV builder separator
# config.csv_options = { col_sep: ';' }
#
@@ -243,24 +197,15 @@
# == Menu System
#
# You can add a navigation menu to be used in your application, or configure a provided menu
#
- # To change the default utility navigation to show a link to your website & a logout btn
- #
- # config.namespace :admin do |admin|
- # admin.build_menu :utility_navigation do |menu|
- # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
- # admin.add_logout_button_to_menu menu
- # end
- # end
- #
# If you wanted to add a static menu item to the default menu provided:
#
# config.namespace :admin do |admin|
# admin.build_menu :default do |menu|
- # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: "_blank" }
+ # menu.add label: "My Great Website", url: "https://mygreatwebsite.example.com", html_options: { target: :blank }
# end
# end
# == Download Links
#
@@ -272,15 +217,14 @@
# config.namespace :admin do |admin|
#
# # Disable the links entirely
# admin.download_links = false
#
- # # Only show XML & PDF options
+ # # Only show XML & PDF options. You must register the format mime type with `Mime::Type.register`.
# admin.download_links = [:xml, :pdf]
#
- # # Enable/disable the links based on block
- # # (for example, with cancan)
+ # # Enable/disable the links based on block (for example, with cancan)
# admin.download_links = proc { can?(:view_download_links) }
#
# end
# == Pagination
@@ -320,33 +264,12 @@
# :title,
# :email,
# ]
# config.filter_method_for_large_association = '_start'
- # == Head
- #
- # You can add your own content to the site head like analytics. Make sure
- # you only pass content you trust.
- #
- # config.head = ''.html_safe
-
- # == Footer
- #
- # By default, the footer shows the current Active Admin version. You can
- # override the content of the footer here.
- #
- # config.footer = 'my custom footer text'
-
# == Sorting
#
# By default ActiveAdmin::OrderClause is used for sorting logic
# You can inherit it with own class and inject it for all resources
#
# config.order_clause = MyOrderClause
-
- # == Webpacker
- #
- # By default, Active Admin uses Sprocket's asset pipeline.
- # You can switch to using Webpacker here.
- #
- <% unless @use_webpacker %># <% end %>config.use_webpacker = true
end