Sha256: a5b7eb0f3e6c38511467809d6f78a3a31adf9beb7b9298d7e122e69389bcea11

Contents?: true

Size: 720 Bytes

Versions: 17

Compression:

Stored size: 720 Bytes

Contents

# frozen_string_literal: true
module ActiveAdmin
  class ResourceController < BaseController

    module ActionBuilder
      extend ActiveSupport::Concern

      module ClassMethods

        def clear_member_actions!
          remove_action_methods(:member)
          active_admin_config.clear_member_actions!
        end

        def clear_collection_actions!
          remove_action_methods(:collection)
          active_admin_config.clear_collection_actions!
        end

        private

        def remove_action_methods(actions_type)
          active_admin_config.public_send("#{actions_type}_actions").each do |action|
            remove_method action.name
          end
        end
      end

    end

  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
activeadmin-3.2.5 lib/active_admin/resource_controller/action_builder.rb
activeadmin-3.2.4 lib/active_admin/resource_controller/action_builder.rb
activeadmin-3.2.3 lib/active_admin/resource_controller/action_builder.rb
activeadmin-3.2.2 lib/active_admin/resource_controller/action_builder.rb
activeadmin-3.2.1 lib/active_admin/resource_controller/action_builder.rb
activeadmin-3.2.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-3.1.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-3.0.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.14.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.13.1 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.13.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.12.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.11.2 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.11.1 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.11.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.10.1 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.10.0 lib/active_admin/resource_controller/action_builder.rb