Sha256: 5fb6f2dddeb4623f8f3e82704a0f9029ab0b8fff080e7f448ae77b2ba552c782

Contents?: true

Size: 690 Bytes

Versions: 24

Compression:

Stored size: 690 Bytes

Contents

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

24 entries across 24 versions & 3 rubygems

Version Path
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/activeadmin-2.9.0/lib/active_admin/resource_controller/action_builder.rb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/activeadmin-2.9.0/lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.9.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.8.1 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.8.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.7.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.6.1 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.6.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.5.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.4.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.3.1 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.3.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.2.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.1.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.0.0 lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.0.0.rc2 lib/active_admin/resource_controller/action_builder.rb
activeadmin_addons-1.7.1 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/resource_controller/action_builder.rb
activeadmin-2.0.0.rc1 lib/active_admin/resource_controller/action_builder.rb
activeadmin_addons-1.7.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/resource_controller/action_builder.rb
activeadmin_addons-1.6.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/lib/active_admin/resource_controller/action_builder.rb