Sha256: b2b0b098872dcc89d36dce6433d35109633226a94bd8abcedcfda923f8651a2e

Contents?: true

Size: 307 Bytes

Versions: 142

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

require_dependency "collection_presenter"

module PresenterHelper
  def present(object, presenter_class = nil, &block)
    if object.respond_to?(:each)
      CollectionPresenter.new(object, presenter_class, &block)
    else
      presenter_class.new(object)
    end
  end
end

Version data entries

142 entries across 142 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/helpers/presenter_helper.rb
renalware-core-2.1.0 app/helpers/presenter_helper.rb
renalware-core-2.0.167 app/helpers/presenter_helper.rb
renalware-core-2.0.166 app/helpers/presenter_helper.rb
renalware-core-2.0.165 app/helpers/presenter_helper.rb
renalware-core-2.0.164 app/helpers/presenter_helper.rb
renalware-core-2.0.163 app/helpers/presenter_helper.rb
renalware-core-2.0.162 app/helpers/presenter_helper.rb
renalware-core-2.0.161 app/helpers/presenter_helper.rb
renalware-core-2.0.160 app/helpers/presenter_helper.rb
renalware-core-2.0.159 app/helpers/presenter_helper.rb
renalware-core-2.0.158 app/helpers/presenter_helper.rb
renalware-core-2.0.157 app/helpers/presenter_helper.rb
renalware-core-2.0.156 app/helpers/presenter_helper.rb
renalware-core-2.0.155 app/helpers/presenter_helper.rb
renalware-core-2.0.153 app/helpers/presenter_helper.rb
renalware-core-2.0.152 app/helpers/presenter_helper.rb
renalware-core-2.0.151 app/helpers/presenter_helper.rb
renalware-core-2.0.149 app/helpers/presenter_helper.rb
renalware-core-2.0.148 app/helpers/presenter_helper.rb