Sha256: a9ee4b5da5f2f0a62d9a03afc021b02d4fc9823929a1b23bb0171545479ee187
Contents?: true
Size: 643 Bytes
Versions: 5
Compression:
Stored size: 643 Bytes
Contents
# frozen_string_literal: true module RailsMiniProfiler module ApplicationHelper include Pagy::Frontend def present(model, presenter_class = nil, **kwargs) klass = presenter_class || "#{model.class}Presenter".constantize presenter = klass.new(model, self, **kwargs) yield(presenter) if block_given? presenter end def inline_svg(path, options = {}) if defined?(Webpacker::Engine) && RailsMiniProfiler.configuration.ui.webpacker_enabled path = "media/images/#{path}" inline_svg_pack_tag(path, options) else inline_svg_tag(path, options) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems