Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在努力在活动管理员的每条路线的末尾添加参数,知道怎么做吗?
例如/admin/edge?journey=1
/admin/edge?journey=1
我希望将旅程参数附加到所有操作 url
任何帮助或建议将不胜感激
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