today_ai_weather/app/controllers/application_controller.rb

13 lines
345 B
Ruby
Raw Normal View History

2025-01-19 01:13:59 +08:00
class ApplicationController < ActionController::Base
include SeoConcern
2025-01-19 01:13:59 +08:00
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
allow_browser versions: :modern
before_action :set_locale
private
def set_locale
I18n.locale = params[:locale] || I18n.default_locale
end
2025-01-19 01:13:59 +08:00
end