lib/active_admin/base_controller.rb in activeadmin-1.4.3 vs lib/active_admin/base_controller.rb in activeadmin-2.0.0.rc1

- old
+ new

@@ -20,22 +20,22 @@ # Reference to the Resource object which initialized # this controller attr_accessor :active_admin_config end + include Authorization + include Menu + + private + # By default Rails will render un-implemented actions when the view exists. Because Active # Admin allows you to not render any of the actions by using the #actions method, we need # to check if they are implemented. def only_render_implemented_actions raise AbstractController::ActionNotFound unless action_methods.include?(params[:action]) end - include Authorization - include Menu - - private - # Calls the authentication method as defined in ActiveAdmin.authentication_method def authenticate_active_admin_user send(active_admin_namespace.authentication_method) if active_admin_namespace.authentication_method end @@ -72,10 +72,10 @@ ACTIVE_ADMIN_ACTIONS.include?(params[:action].to_sym) ? false : 'active_admin' end def active_admin_root controller, action = active_admin_namespace.root_to.split '#' - {controller: controller, action: action} + { controller: controller, action: action } end end end