/config/initializers/active_admin.rb

https://github.com/gmanley/loggia · Ruby · 214 lines · 11 code · 30 blank · 173 comment · 0 complexity · 91146be97e33dc0d7f83751096d263d1 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 = "Loggia"
  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_user!
  54. config.authorization_adapter = ActiveAdmin::CanCanAdapter
  55. config.cancan_ability_class = 'ActiveAdminAbility'
  56. # == Current User
  57. #
  58. # Active Admin will associate actions with the current
  59. # user performing them.
  60. #
  61. # This setting changes the method which Active Admin calls
  62. # to return the currently logged in user.
  63. config.current_user_method = :current_user
  64. # == Logging Out
  65. #
  66. # Active Admin displays a logout link on each screen. These
  67. # settings configure the location and method used for the link.
  68. #
  69. # This setting changes the path where the link points to. If it's
  70. # a string, the strings is used as the path. If it's a Symbol, we
  71. # will call the method to return the path.
  72. #
  73. # Default:
  74. config.logout_link_path = :destroy_user_session_path
  75. # This setting changes the http method used when rendering the
  76. # link. For example :get, :delete, :put, etc..
  77. #
  78. # Default:
  79. # config.logout_link_method = :get
  80. # == Root
  81. #
  82. # Set the action to call for the root path. You can set different
  83. # roots for each namespace.
  84. #
  85. # Default:
  86. # config.root_to = 'dashboard#index'
  87. # == Admin Comments
  88. #
  89. # Admin comments allow you to add comments to any model for admin use.
  90. # Admin comments are enabled by default.
  91. #
  92. # Default:
  93. # config.allow_comments = true
  94. #
  95. # You can turn them on and off for any given namespace by using a
  96. # namespace config block.
  97. #
  98. # Eg:
  99. # config.namespace :without_comments do |without_comments|
  100. # without_comments.allow_comments = false
  101. # end
  102. config.allow_comments = false
  103. # == Batch Actions
  104. #
  105. # Enable and disable Batch Actions
  106. #
  107. config.batch_actions = true
  108. # == Controller Filters
  109. #
  110. # You can add before, after and around filters to all of your
  111. # Active Admin resources and pages from here.
  112. #
  113. # config.before_filter :do_something_awesome
  114. # == Register Stylesheets & Javascripts
  115. #
  116. # We recommend using the built in Active Admin layout and loading
  117. # up your own stylesheets / javascripts to customize the look
  118. # and feel.
  119. #
  120. # To load a stylesheet:
  121. # config.register_stylesheet 'my_stylesheet.css'
  122. # You can provide an options hash for more control, which is passed along to stylesheet_link_tag():
  123. # config.register_stylesheet 'my_print_stylesheet.css', :media => :print
  124. #
  125. # To load a javascript file:
  126. # config.register_javascript 'my_javascript.js'
  127. # == CSV options
  128. #
  129. # Set the CSV builder separator (default is ",")
  130. # config.csv_column_separator = ','
  131. #
  132. # Set the CSV builder options (default is {})
  133. # config.csv_options = {}
  134. # == Menu System
  135. #
  136. # You can add a navigation menu to be used in your application, or configure a provided menu
  137. #
  138. # To change the default utility navigation to show a link to your website & a logout btn
  139. #
  140. # config.namespace :admin do |admin|
  141. # admin.build_menu :utility_navigation do |menu|
  142. # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
  143. # admin.add_logout_button_to_menu menu
  144. # end
  145. # end
  146. #
  147. # If you wanted to add a static menu item to the default menu provided:
  148. #
  149. # config.namespace :admin do |admin|
  150. # admin.build_menu :default do |menu|
  151. # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
  152. # end
  153. # end
  154. # == Download Links
  155. #
  156. # You can disable download links on resource listing pages,
  157. # or customize the formats shown per namespace/globally
  158. #
  159. # To disable/customize for the :admin namespace:
  160. #
  161. # config.namespace :admin do |admin|
  162. #
  163. # # Disable the links entirely
  164. # admin.download_links = false
  165. #
  166. # # Only show XML & PDF options
  167. # admin.download_links = [:xml, :pdf]
  168. #
  169. # end
  170. config.download_links = false
  171. # == Pagination
  172. #
  173. # Pagination is enabled by default for all resources.
  174. # You can control the default per page count for all resources here.
  175. #
  176. # config.default_per_page = 30
  177. # == Filters
  178. #
  179. # By default the index screen includes a “Filters” sidebar on the right
  180. # hand side with a filter for each attribute of the registered model.
  181. # You can enable or disable them for all resources here.
  182. #
  183. # config.filters = true
  184. end