scinote-web/app/controllers/active_storage/custom_base_controller.rb

13 lines
293 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# The base controller for all ActiveStorage controllers.
module ActiveStorage
2019-10-03 17:00:59 +08:00
class CustomBaseController < ApplicationController
2019-09-12 23:21:48 +08:00
include ActiveStorage::SetCurrent
before_action do
ActiveStorage::Current.host = request.base_url
end
end
end