Title / Description
Code def protected! unless authorized? response['WWW-Authenticate'] = %(Basic realm="Restricted Area => your IP is (#{request.ip})") throw(:halt, [401, "Not authorized\n"]) end end def my_custom puts "i am in my custom end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code