Module: Gotenberg::Helpers::ActionView
- Defined in:
- lib/gotenberg/helpers/action_view.rb
Instance Method Summary collapse
- #gotenberg_image_tag(source, options = {}) ⇒ Object
- #gotenberg_javascript_tag(source, options = {}) ⇒ Object
- #gotenberg_stylesheet_tag(source, options = {}) ⇒ Object
Instance Method Details
#gotenberg_image_tag(source, options = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/gotenberg/helpers/action_view.rb', line 4 def gotenberg_image_tag source, = {} [:tag] = 'image' [:src] = gotenberg_source_location(source, ) gotenberg_context_tag() end |
#gotenberg_javascript_tag(source, options = {}) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/gotenberg/helpers/action_view.rb', line 11 def gotenberg_javascript_tag source, = {} [:tag] = 'js' [:src] = gotenberg_source_location(source, ) gotenberg_context_tag() end |
#gotenberg_stylesheet_tag(source, options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/gotenberg/helpers/action_view.rb', line 18 def gotenberg_stylesheet_tag source, = {} [:tag] = 'css' [:src] = gotenberg_source_location(source, ) [:base_path] = case gotenberg_source_type() when :absolute Rails.root when :proxy compute_asset_host(source, protocol: :request) when :static Rails.public_path end [:skip_analyze] ||= false gotenberg_context_tag() end |