Sha256: e2766e80a95e2d9eee944c7797d07fe12cc1129c14e2abb8125c22d1a1b8c1a3
Contents?: true
Size: 587 Bytes
Versions: 3
Compression:
Stored size: 587 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) path = "media/images/#{path}" inline_svg_pack_tag(path, options) else inline_svg_tag(path, options) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems