Sha256: ba842277915b3b320dcd70ccb7307e23885dd8745f2b8668f28b1997eb2aa3bb

Contents?: true

Size: 313 Bytes

Versions: 6

Compression:

Stored size: 313 Bytes

Contents

# frozen_string_literal: true

module Html2Pdf
  module Rails
    module Helper
      def html2pdf_base_tag
        # NOTE: for Ngrok
        host = request.headers['HTTP_X_ORIGINAL_HOST'] || request.host
        base_url = "#{request.protocol}#{host}"
        tag.base href: base_url
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
html2pdf-rails-0.4.0 lib/html2pdf/rails/helper.rb
html2pdf-rails-0.3.1 lib/html2pdf/rails/helper.rb
html2pdf-rails-0.3.0 lib/html2pdf/rails/helper.rb
html2pdf-rails-0.2.0 lib/html2pdf/rails/helper.rb
html2pdf-rails-0.1.1 lib/html2pdf/rails/helper.rb
html2pdf-rails-0.1.0 lib/html2pdf/rails/helper.rb