Mattias Bodlund 1 year ago
parent
commit
4ea91dd489
1 changed files with 8 additions and 6 deletions
  1. +8
    -6
      app/controllers/application_controller.rb

+ 8
- 6
app/controllers/application_controller.rb View File

@ -1,15 +1,17 @@
class ApplicationController < ActionController::Base class ApplicationController < ActionController::Base
http_basic_authenticate_with name: "stupid", password: "studio", except: Rails.env.development?
private private
def set_locale
I18n.locale = params[:locale]&.to_sym.presence_in(I18n.available_locales) || I18n.default_locale
end
def set_locale
I18n.locale = params[:locale]&.to_sym.presence_in(I18n.available_locales) || I18n.default_locale
end
def not_found
raise ActionController::RoutingError.new('Not Found')
end
def not_found
raise ActionController::RoutingError.new('Not Found')
end
end end

Loading…
Cancel
Save