Sha256: 23cd6d18b3295ac3ee529e2088273ef799f85d92970cf9406fd5de348ef0b540

Contents?: true

Size: 249 Bytes

Versions: 9

Compression:

Stored size: 249 Bytes

Contents

module EntryPresenter
  extend ActiveSupport::Concern

  module ClassMethods
    def headings
      columns.values
    end

    def columns
      @columns
    end
  end

  def fields
    self.class.columns.keys.map { |field| send(field) }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
slices-2.0.2 app/presenters/entry_presenter.rb
slices-2.0.1 app/presenters/entry_presenter.rb
slices-2.0.0 app/presenters/entry_presenter.rb
slices-1.0.5 app/presenters/entry_presenter.rb
slices-1.0.4 app/presenters/entry_presenter.rb
slices-1.0.3 app/presenters/entry_presenter.rb
slices-1.0.2 app/presenters/entry_presenter.rb
slices-1.0.1 app/presenters/entry_presenter.rb
slices-1.0.0 app/presenters/entry_presenter.rb