标签:class require admin cat ons 页面 ati res min
本地执行:resque_web
访问 http://0.0.0.0:5678/overview
服务器配置:resque-web gem
gem ‘resque-web‘, require: ‘resque_web‘
require "resque_web" MyApp::Application.routes.draw do mount ResqueWeb::Engine => "/resque_web" end
resque_web_constraint = lambda { |request| request.remote_ip == ‘127.0.0.1‘ } constraints resque_web_constraint do mount ResqueWeb::Engine => "/resque_web" end
# config/routes.rb
resque_web_constraint = lambda do |request|
current_user = request.env[‘warden‘].user
current_user.present? && current_user.respond_to?(:is_admin?) && current_user.is_admin?
end
constraints resque_web_constraint do
mount ResqueWeb::Engine => "/resque_web"
end
标签:class require admin cat ons 页面 ati res min
原文地址:https://www.cnblogs.com/qinyan20/p/10733530.html