Sha256: e229485d1c4be9c201998b94c55ff715c9c535f554c88b0c1af9ef2aeb022751
Contents?: true
Size: 685 Bytes
Versions: 7
Compression:
Stored size: 685 Bytes
Contents
module ResqueWeb class ApplicationController < ActionController::Base protect_from_forgery before_filter :set_subtabs, :authorize helper :all def self.subtabs(*tab_names) return defined?(@subtabs) ? @subtabs : [] if tab_names.empty? @subtabs = tab_names end def set_subtabs(subtabs = self.class.subtabs) @subtabs = subtabs end private def authorize if ENV["RESQUE_WEB_HTTP_BASIC_AUTH_USER"] && ENV["RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD"] authenticate_or_request_with_http_basic {|u, p| u == ENV["RESQUE_WEB_HTTP_BASIC_AUTH_USER"] && p == ENV["RESQUE_WEB_HTTP_BASIC_AUTH_PASSWORD"] } end end end end
Version data entries
7 entries across 7 versions & 3 rubygems