How to append param at end of every route active admin

137 Views Asked by At

I am struggling to add param at the end of every route in active admin any idea how it can be done??

For example /admin/edge?journey=1

i want journey param to be appended to all actions urls

Any help or suggestion would be greatly appreciated

1

There are 1 best solutions below

4
plusor On
class ApplicationController < ActionController::Base

  before_action if: :active_admin_controller? do
    params[:journey] = 1
  end

  private
  def active_admin_controller?
    self.is_a?(ActiveAdmin::BaseController)
  end
end