class ActiveAdmin::Namespace
def add_logout_button_to_menu(menu, priority = 20, html_options = {})
-
html_options(Hash) -- An options hash to pass along to link_to -
priority(Fixnum) -- The numeric priority for the order in which it appears -
menu(ActiveAdmin::MenuItem) -- The menu to add the logout link to
def add_logout_button_to_menu(menu, priority = 20, html_options = {}) if logout_link_path html_options = html_options.reverse_merge(method: logout_link_method || :get) menu.add id: 'logout', priority: priority, html_options: html_options, label: ->{ I18n.t 'active_admin.logout' }, url: ->{ render_or_call_method_or_proc_on self, active_admin_namespace.logout_link_path }, if: :current_active_admin_user? end end