Sha256: 8f7b19b1a02a92fc2d10b74ac4d943ad28938bbe57727deaa488d3edb305bce3
Contents?: true
Size: 334 Bytes
Versions: 6
Compression:
Stored size: 334 Bytes
Contents
# frozen_string_literal: true module RailsMiniProfiler module ApplicationHelper 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 end end
Version data entries
6 entries across 6 versions & 1 rubygems