You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
602 B

class ApplicationController < ActionController::Base
before_action :authenticate
OPEN_ACCESS_PERIOD = Date.new(2026, 8, 30)..Date.new(2026, 9, 6)
private
def authenticate
return if OPEN_ACCESS_PERIOD.cover?(Date.current)
authenticate_or_request_with_http_basic do |name, password|
name == "stupid" && password == "studio"
end if Rails.env.production?
end
def set_locale
I18n.locale = params[:locale].presence_in(I18n.available_locales.map(&:to_s)) || I18n.default_locale
end
def not_found
raise ActionController::RoutingError.new("Not Found")
end
end