Skip to content

Instantly share code, notes, and snippets.

@braidn
Created October 18, 2013 15:05
Show Gist options
  • Save braidn/7042940 to your computer and use it in GitHub Desktop.
Save braidn/7042940 to your computer and use it in GitHub Desktop.
module Quarterly
class SecretController < ApplicationController
before_filter :authenticate
def coco
render 'pages/coco-music'
end
private
def authenticate
authenticate_or_request_with_http_basic do |user, pass|
user == ENV['COCO_USERNAME'] &&
pass == ENV['COCO_PASSWORD']
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment