diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 37dfeff..3959bed 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,7 +5,9 @@ class ApplicationController < ActionController::Base private def authenticate - http_basic_authenticate_with name: "stupid", password: "studio" if Rails.env.production? + authenticate_or_request_with_http_basic do |name, password| + name == "stupid" && password == "studio" + end if Rails.env.production? end @@ -17,6 +19,4 @@ private def not_found raise ActionController::RoutingError.new("Not Found") end - - end