I’m trying to HTTP Basic Authentication mentioned at
I’m trying to understand the document.
The RailsCasts sample is:
authenticate_or_request_with_http_basic do |username, password|
username == “foo” && password == “bar”
But I would like to change “realm” as well. It looks possible in the
documentation. But I don’t understand how to do it because my
understanding of block in Ruby isn’t good.
Can anybody give me a sample that uses “realm”?