lib/generators/active_admin/install/templates/active_admin.rb.erb in activeadmin-0.6.6 vs lib/generators/active_admin/install/templates/active_admin.rb.erb in activeadmin-1.0.0.pre1

- old
+ new

@@ -1,7 +1,6 @@ ActiveAdmin.setup do |config| - # == Site Title # # Set the title that is displayed on the main layout # for each of the active admin pages. # @@ -13,13 +12,13 @@ # config.site_title_link = "/" # Set an optional image to be displayed for the header # instead of a string (overrides :site_title) # - # Note: Recommended image height is 21px to properly fit in the header + # Note: Aim for an image that's 21px high so it fits in the header. # - # config.site_title_image = "/images/logo.png" + # config.site_title_image = "logo.png" # == Default Namespace # # Set the default namespace each administration resource # will be added to. @@ -52,21 +51,26 @@ # Active Admin will automatically call an authentication # method in a before filter of all controller actions to # ensure that there is a currently logged in admin user. # # This setting changes the method which Active Admin calls - # within the controller. - config.authentication_method = :authenticate_<%= @underscored_user_name %>! + # within the application controller. + <% unless @use_authentication_method %># <% end %>config.authentication_method = :authenticate_<%= @underscored_user_name %>! # == 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. # config.authorization_adapter = ActiveAdmin::CanCanAdapter + # 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" + # You can customize your CanCan Ability class name here. # config.cancan_ability_class = "Ability" # You can specify a method to be called on unauthorized access. # This is necessary in order to prevent a redirect loop which happens @@ -79,14 +83,13 @@ # # Active Admin will associate actions with the current # user performing them. # # This setting changes the method which Active Admin calls - # to return the currently logged in user. - config.current_user_method = :current_<%= @underscored_user_name %> + # (within the application controller) to return the currently logged in user. + <% unless @use_authentication_method %># <% end %>config.current_user_method = :current_<%= @underscored_user_name %> - # == Logging Out # # Active Admin displays a logout link on each screen. These # settings configure the location and method used for the link. # @@ -101,53 +104,54 @@ # 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. # # Default: # config.root_to = 'dashboard#index' - # == Admin Comments # # This allows your users to comment on any resource registered with Active Admin. # # You can completely disable comments: - # config.allow_comments = false + # config.comments = false # # You can disable the menu item for the comments index page: # config.show_comments_in_menu = false # # You can change the name under which comments are registered: # config.comments_registration_name = 'AdminComment' - # == Batch Actions # # Enable and disable Batch Actions # config.batch_actions = true - # == Controller Filters # # You can add before, after and around filters to all of your # Active Admin resources and pages from here. # # config.before_filter :do_something_awesome - - + # == Setting a Favicon # - # config.favicon = '/assets/favicon.ico' + # config.favicon = 'favicon.ico' + # == Removing Breadcrumbs + # + # Breadcrumbs are enabled by default. You can customize them for individual + # resources or you can disable them globally from here. + # + # config.breadcrumb = false # == Register Stylesheets & Javascripts # # We recommend using the built in Active Admin layout and loading # up your own stylesheets / javascripts to customize the look @@ -155,25 +159,23 @@ # # 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 + # 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 => ';' } + # config.csv_options = { col_sep: ';' } # # Force the use of quotes - # config.csv_options = { :force_quotes => true } + # config.csv_options = { force_quotes: true } - # == 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 @@ -191,11 +193,10 @@ # admin.build_menu :default do |menu| # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank } # end # end - # == Download Links # # You can disable download links on resource listing pages, # or customize the formats shown per namespace/globally # @@ -207,25 +208,26 @@ # admin.download_links = false # # # Only show XML & PDF options # admin.download_links = [:xml, :pdf] # + # # Enable/disable the links based on block + # # (for example, with cancan) + # admin.download_links = proc { can?(:view_download_links) } + # # end - # == Pagination # # Pagination is enabled by default for all resources. # You can control the default per page count for all resources here. # # config.default_per_page = 30 - # == Filters # - # By default the index screen includes a “Filters” sidebar on the right + # By default the index screen includes a "Filters" sidebar on the right # hand side with a filter for each attribute of the registered model. # You can enable or disable them for all resources here. # # config.filters = true - end