PageRenderTime 33ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/config/initializers/active_admin.rb

https://gitlab.com/adamlwalker/resume
Ruby | 246 lines | 7 code | 25 blank | 214 comment | 0 complexity | 8d56485870e6dd9c855daabb7ca8bbd7 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 = "Resume Site"
  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: Aim for an image that's 21px high so it fits in the header.
  16. #
  17. # config.site_title_image = "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 application controller.
  53. config.authentication_method = :authenticate_admin_user!
  54. # == User Authorization
  55. #
  56. # Active Admin will automatically call an authorization
  57. # method in a before filter of all controller actions to
  58. # ensure that there is a user with proper rights. You can use
  59. # CanCanAdapter or make your own. Please refer to documentation.
  60. # config.authorization_adapter = ActiveAdmin::CanCanAdapter
  61. # In case you prefer Pundit over other solutions you can here pass
  62. # the name of default policy class. This policy will be used in every
  63. # case when Pundit is unable to find suitable policy.
  64. # config.pundit_default_policy = "MyDefaultPunditPolicy"
  65. # You can customize your CanCan Ability class name here.
  66. # config.cancan_ability_class = "Ability"
  67. # You can specify a method to be called on unauthorized access.
  68. # This is necessary in order to prevent a redirect loop which happens
  69. # because, by default, user gets redirected to Dashboard. If user
  70. # doesn't have access to Dashboard, he'll end up in a redirect loop.
  71. # Method provided here should be defined in application_controller.rb.
  72. # config.on_unauthorized_access = :access_denied
  73. # == Current User
  74. #
  75. # Active Admin will associate actions with the current
  76. # user performing them.
  77. #
  78. # This setting changes the method which Active Admin calls
  79. # (within the application controller) to return the currently logged in user.
  80. config.current_user_method = :current_admin_user
  81. # == Logging Out
  82. #
  83. # Active Admin displays a logout link on each screen. These
  84. # settings configure the location and method used for the link.
  85. #
  86. # This setting changes the path where the link points to. If it's
  87. # a string, the strings is used as the path. If it's a Symbol, we
  88. # will call the method to return the path.
  89. #
  90. # Default:
  91. config.logout_link_path = :destroy_admin_user_session_path
  92. # This setting changes the http method used when rendering the
  93. # link. For example :get, :delete, :put, etc..
  94. #
  95. # Default:
  96. # config.logout_link_method = :get
  97. # == Root
  98. #
  99. # Set the action to call for the root path. You can set different
  100. # roots for each namespace.
  101. #
  102. # Default:
  103. # config.root_to = 'dashboard#index'
  104. # == Admin Comments
  105. #
  106. # This allows your users to comment on any resource registered with Active Admin.
  107. #
  108. # You can completely disable comments:
  109. # config.comments = false
  110. #
  111. # You can disable the menu item for the comments index page:
  112. # config.show_comments_in_menu = false
  113. #
  114. # You can change the name under which comments are registered:
  115. # config.comments_registration_name = 'AdminComment'
  116. # == Batch Actions
  117. #
  118. # Enable and disable Batch Actions
  119. #
  120. config.batch_actions = true
  121. # == Controller Filters
  122. #
  123. # You can add before, after and around filters to all of your
  124. # Active Admin resources and pages from here.
  125. #
  126. # config.before_filter :do_something_awesome
  127. # == Setting a Favicon
  128. #
  129. # config.favicon = 'favicon.ico'
  130. # == Meta Tags
  131. #
  132. # Add additional meta tags to the head element of active admin pages.
  133. #
  134. # Add tags to all pages logged in users see:
  135. # config.meta_tags = { author: 'My Company' }
  136. # By default, sign up/sign in/recover password pages are excluded
  137. # from showing up in search engine results by adding a robots meta
  138. # tag. You can reset the hash of meta tags included in logged out
  139. # pages:
  140. # config.meta_tags_for_logged_out_pages = {}
  141. # == Removing Breadcrumbs
  142. #
  143. # Breadcrumbs are enabled by default. You can customize them for individual
  144. # resources or you can disable them globally from here.
  145. #
  146. # config.breadcrumb = false
  147. # == Register Stylesheets & Javascripts
  148. #
  149. # We recommend using the built in Active Admin layout and loading
  150. # up your own stylesheets / javascripts to customize the look
  151. # and feel.
  152. #
  153. # To load a stylesheet:
  154. # config.register_stylesheet 'my_stylesheet.css'
  155. #
  156. # You can provide an options hash for more control, which is passed along to stylesheet_link_tag():
  157. # config.register_stylesheet 'my_print_stylesheet.css', media: :print
  158. #
  159. # To load a javascript file:
  160. # config.register_javascript 'my_javascript.js'
  161. # == CSV options
  162. #
  163. # Set the CSV builder separator
  164. # config.csv_options = { col_sep: ';' }
  165. #
  166. # Force the use of quotes
  167. # config.csv_options = { force_quotes: true }
  168. # == Menu System
  169. #
  170. # You can add a navigation menu to be used in your application, or configure a provided menu
  171. #
  172. # To change the default utility navigation to show a link to your website & a logout btn
  173. #
  174. # config.namespace :admin do |admin|
  175. # admin.build_menu :utility_navigation do |menu|
  176. # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
  177. # admin.add_logout_button_to_menu menu
  178. # end
  179. # end
  180. #
  181. # If you wanted to add a static menu item to the default menu provided:
  182. #
  183. # config.namespace :admin do |admin|
  184. # admin.build_menu :default do |menu|
  185. # menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: :blank }
  186. # end
  187. # end
  188. # == Download Links
  189. #
  190. # You can disable download links on resource listing pages,
  191. # or customize the formats shown per namespace/globally
  192. #
  193. # To disable/customize for the :admin namespace:
  194. #
  195. # config.namespace :admin do |admin|
  196. #
  197. # # Disable the links entirely
  198. # admin.download_links = false
  199. #
  200. # # Only show XML & PDF options
  201. # admin.download_links = [:xml, :pdf]
  202. #
  203. # # Enable/disable the links based on block
  204. # # (for example, with cancan)
  205. # admin.download_links = proc { can?(:view_download_links) }
  206. #
  207. # end
  208. # == Pagination
  209. #
  210. # Pagination is enabled by default for all resources.
  211. # You can control the default per page count for all resources here.
  212. #
  213. # config.default_per_page = 30
  214. # == Filters
  215. #
  216. # By default the index screen includes a "Filters" sidebar on the right
  217. # hand side with a filter for each attribute of the registered model.
  218. # You can enable or disable them for all resources here.
  219. #
  220. # config.filters = true
  221. end