Sha256: bd96c922a332363e02023cb32fa82733073b813518c198f83c948668cba5a35a

Contents?: true

Size: 276 Bytes

Versions: 35

Compression:

Stored size: 276 Bytes

Contents

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

35 entries across 35 versions & 1 rubygems

Version Path
renalware-core-2.0.16 app/helpers/presenter_helper.rb
renalware-core-2.0.15 app/helpers/presenter_helper.rb
renalware-core-2.0.14 app/helpers/presenter_helper.rb
renalware-core-2.0.13 app/helpers/presenter_helper.rb
renalware-core-2.0.12 app/helpers/presenter_helper.rb
renalware-core-2.0.11 app/helpers/presenter_helper.rb
renalware-core-2.0.9 app/helpers/presenter_helper.rb
renalware-core-2.0.8 app/helpers/presenter_helper.rb
renalware-core-2.0.7 app/helpers/presenter_helper.rb
renalware-core-2.0.5 app/helpers/presenter_helper.rb
renalware-core-2.0.4 app/helpers/presenter_helper.rb
renalware-core-2.0.3 app/helpers/presenter_helper.rb
renalware-core-2.0.2 app/helpers/presenter_helper.rb
renalware-core-2.0.1 app/helpers/presenter_helper.rb
renalware-core-2.0.0 app/helpers/presenter_helper.rb
renalware-core-2.0.0.pre.rc13 app/helpers/presenter_helper.rb
renalware-core-2.0.0.pre.rc11 app/helpers/presenter_helper.rb
renalware-core-2.0.0.pre.rc10 app/helpers/presenter_helper.rb
renalware-core-2.0.0.pre.rc9 app/helpers/presenter_helper.rb
renalware-core-2.0.0.pre.rc8 app/helpers/presenter_helper.rb