Sha256: c6a8b45738d605cb79caa82052840f6cde7370ca62a56cee0acced0c171b06cf
Contents?: true
Size: 634 Bytes
Versions: 5
Compression:
Stored size: 634 Bytes
Contents
module Vidibus module Realm module Extensions module Controller extend ActiveSupport::Concern included do helper_method :realm end # Ensures that a realm is present. def ensure_realm! realm or render(:text => "Realm required!", :status => :unauthorized) end # Returns the current realm. def realm env[:realm] end # Sets the current realm. # Usually the realm will be detected and set by the Rack app. def set_realm(value) env[:realm] = value end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems