|
|
|
@ -1,8 +1,13 @@ |
|
|
|
class ApplicationController < ActionController::Base |
|
|
|
http_basic_authenticate_with name: "stupid", password: "studio" if Rails.env.production? |
|
|
|
before_action :authenticate |
|
|
|
|
|
|
|
|
|
|
|
private |
|
|
|
|
|
|
|
def authenticate |
|
|
|
http_basic_authenticate_with name: "stupid", password: "studio" if Rails.env.production? |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def set_locale |
|
|
|
I18n.locale = params[:locale].presence_in(I18n.available_locales.map(&:to_s)) || I18n.default_locale |
|
|
|
@ -12,4 +17,6 @@ private |
|
|
|
def not_found |
|
|
|
raise ActionController::RoutingError.new("Not Found") |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
end |