20 lines
476 B
Ruby
20 lines
476 B
Ruby
class ApplicationController < ActionController::Base
|
|
include SeoConcern
|
|
# 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
|
|
after_action :track_action
|
|
|
|
protected
|
|
|
|
def track_action
|
|
ahoy.track "Viewed Application", request.path_parameters
|
|
end
|
|
|
|
private
|
|
|
|
def set_locale
|
|
I18n.locale = params[:locale] || I18n.default_locale
|
|
end
|
|
end
|