/lib/generators/active_admin/install/templates/active_admin.rb.erb

https://github.com/macfanatic/active_admin · Ruby HTML · 209 lines · 178 code · 31 blank · 0 comment · 30 complexity · 70a3a3ea0a24702075efe5a355c28c70 MD5 · raw file

  1. ActiveAdmin.setup do |config|
  2. # == Site Title
  3. #
  4. # Set the title that is displayed on the main layout
  5. # for each of the active admin pages.
  6. #
  7. config.site_title = "<%= Rails.application.class.name.split("::").first.titlecase %>"
  8. # Set the link url for the title. For example, to take
  9. # users to your main site. Defaults to no link.
  10. #
  11. # config.site_title_link = "/"
  12. # Set an optional image to be displayed for the header
  13. # instead of a string (overrides :site_title)
  14. #
  15. # Note: Recommended image height is 21px to properly fit in the header
  16. #
  17. # config.site_title_image = "/images/logo.png"
  18. # == Default Namespace
  19. #
  20. # Set the default namespace each administration resource
  21. # will be added to.
  22. #
  23. # eg:
  24. # config.default_namespace = :hello_world
  25. #
  26. # This will create resources in the HelloWorld module and
  27. # will namespace routes to /hello_world/*
  28. #
  29. # To set no namespace by default, use:
  30. # config.default_namespace = false
  31. #
  32. # Default:
  33. # config.default_namespace = :admin
  34. #
  35. # You can customize the settings for each namespace by using
  36. # a namespace block. For example, to change the site title
  37. # within a namespace:
  38. #
  39. # config.namespace :admin do |admin|
  40. # admin.site_title = "Custom Admin Title"
  41. # end
  42. #
  43. # This will ONLY change the title for the admin section. Other
  44. # namespaces will continue to use the main "site_title" configuration.
  45. # == User Authentication
  46. #
  47. # Active Admin will automatically call an authentication
  48. # method in a before filter of all controller actions to
  49. # ensure that there is a currently logged in admin user.
  50. #
  51. # This setting changes the method which Active Admin calls
  52. # within the controller.
  53. config.authentication_method = :authenticate_<%= @underscored_user_name %>!
  54. # == Current User
  55. #
  56. # Active Admin will associate actions with the current
  57. # user performing them.
  58. #
  59. # This setting changes the method which Active Admin calls
  60. # to return the currently logged in user.
  61. config.current_user_method = :current_<%= @underscored_user_name %>
  62. # == Logging Out
  63. #
  64. # Active Admin displays a logout link on each screen. These
  65. # settings configure the location and method used for the link.
  66. #
  67. # This setting changes the path where the link points to. If it's
  68. # a string, the strings is used as the path. If it's a Symbol, we
  69. # will call the method to return the path.
  70. #
  71. # Default:
  72. config.logout_link_path = :destroy_<%= @underscored_user_name %>_session_path
  73. # This setting changes the http method used when rendering the
  74. # link. For example :get, :delete, :put, etc..
  75. #
  76. # Default:
  77. # config.logout_link_method = :get
  78. # == Root
  79. #
  80. # Set the action to call for the root path. You can set different
  81. # roots for each namespace.
  82. #
  83. # Default:
  84. # config.root_to = 'dashboard#index'
  85. # == Admin Comments
  86. #
  87. # This allows your users to comment on any resource registered with Active Admin.
  88. #
  89. # You can completely disable comments:
  90. # config.allow_comments = false
  91. #
  92. # You can disable the menu item for the comments index page:
  93. # config.show_comments_in_menu = false
  94. #
  95. # You can change the name under which comments are registered:
  96. # config.comments_registration_name = 'AdminComment'
  97. # == Batch Actions
  98. #
  99. # Enable and disable Batch Actions
  100. #
  101. config.batch_actions = true
  102. # == Controller Filters
  103. #
  104. # You can add before, after and around filters to all of your
  105. # Active Admin resources and pages from here.
  106. #
  107. # config.before_filter :do_something_awesome
  108. # == Register Stylesheets & Javascripts
  109. #
  110. # We recommend using the built in Active Admin layout and loading
  111. # up your own stylesheets / javascripts to customize the look
  112. # and feel.
  113. #
  114. # To load a stylesheet:
  115. # config.register_stylesheet 'my_stylesheet.css'
  116. #
  117. # You can provide an options hash for more control, which is passed along to stylesheet_link_tag():
  118. # config.register_stylesheet 'my_print_stylesheet.css', :media => :print
  119. #
  120. # To load a javascript file:
  121. # config.register_javascript 'my_javascript.js'
  122. # == CSV options
  123. #
  124. # Set the CSV builder separator (default is ',')
  125. # config.csv_column_separator = ','
  126. #
  127. # Set the CSV builder options (default is {})
  128. # config.csv_options = {}
  129. # == Menu System
  130. #
  131. # You can add a navigation menu to be used in your application, or configure a provided menu
  132. #
  133. # To change the default utility navigation to show a link to your website & a logout btn
  134. #
  135. # config.namespace :admin do |admin|
  136. # admin.build_menu :utility_navigation do |menu|
  137. # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
  138. # admin.add_logout_button_to_menu menu
  139. # end
  140. # end
  141. #
  142. # If you wanted to add a static menu item to the default menu provided:
  143. #
  144. # config.namespace :admin do |admin|
  145. # admin.build_menu :default do |menu|
  146. # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
  147. # end
  148. # end
  149. # == Download Links
  150. #
  151. # You can disable download links on resource listing pages,
  152. # or customize the formats shown per namespace/globally
  153. #
  154. # To disable/customize for the :admin namespace:
  155. #
  156. # config.namespace :admin do |admin|
  157. #
  158. # # Disable the links entirely
  159. # admin.download_links = false
  160. #
  161. # # Only show XML & PDF options
  162. # admin.download_links = [:xml, :pdf]
  163. #
  164. # end
  165. # == Pagination
  166. #
  167. # Pagination is enabled by default for all resources.
  168. # You can control the default per page count for all resources here.
  169. #
  170. # config.default_per_page = 30
  171. # == Filters
  172. #
  173. # By default the index screen includes a “Filters” sidebar on the right
  174. # hand side with a filter for each attribute of the registered model.
  175. # You can enable or disable them for all resources here.
  176. #
  177. # config.filters = true
  178. end