0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-23 09:50:28 +01:00
discourse-custom-wizard/extensions/extra_locales_controller.rb
2020-04-19 16:06:18 +10:00

16 Zeilen
Kein EOL
460 B
Ruby

module ExtraLocalesControllerCustomWizard
def show
if request.referer && URI(request.referer).path.include?('/w/')
bundle = params[:bundle]
if params[:v]&.size == 32
hash = ::ExtraLocalesController.bundle_js_hash(bundle)
immutable_for(1.year) if hash == params[:v]
end
render plain: ::ExtraLocalesController.bundle_js(bundle), content_type: "application/javascript"
else
super
end
end
end