RailsCasts Pro episodes are now free!
Learn more or hide this
Resources
before_filter :authenticate protected def authenticate authenticate_or_request_with_http_basic do |username, password| username == "foo" && password == "bar" end end