app/controllers/admin/communication/websites/preview_controller.rb
class Admin::Communication::Websites::PreviewController < Admin::Communication::Websites::ApplicationController
def style
render body: @website.preview_style,
content_type: "text/css"
end
def assets
path = request.path.partition('/assets').last
url = "#{@website.url}/assets#{path}"
data = URI(url).open.read
render body: data,
content_type: request.format.to_s
end
end