class ApplicationController
Base controller for the whole app: requires an authenticated user, wires Pundit authorization, and handles the per-user locale/theme and the layout choice (auth vs. application).
Public Instance Methods
Source
# File app/controllers/application_controller.rb, line 39 def layout_by_resource devise_controller? ? "auth" : "application" end
Devise screens use the auth layout (no header/navigation).
Source
# File app/controllers/application_controller.rb, line 33 def set_locale_and_theme I18n.locale = current_user.locale if current_user.locale.in?(I18n.available_locales.map(&:to_s)) @theme = current_user.theme end
Language and theme are account preferences (CR-69), read from the profile instead of the old cookie. Auth screens keep the dark paper look.