user
user

Reputation: 1381

Active admin override action

I want to override my update action in all my controllers.

Is it possible to do in one place, not in each controller separately.

Upvotes: 1

Views: 495

Answers (1)

Maxim Krizhanovsky
Maxim Krizhanovsky

Reputation: 26699

You can create a module that overrides the action, and then include in in initializers/active_admin.rb

ActiveAdmin.before_load do |_app|
  ActiveAdmin::BaseController.send :include, your-module-here
end

Upvotes: 1

Related Questions