Sha256: b13f381d425c71a16b56602405513ca4f7c5cf4f570626d43c60ae33293b54af

Contents?: true

Size: 315 Bytes

Versions: 31

Compression:

Stored size: 315 Bytes

Contents

# frozen_string_literal: true

# Keppler
module Downloadable
  extend ActiveSupport::Concern
  included do
    require 'csv'

    def self.to_csv(options = {})
      CSV.generate(options) do |csv|
        csv << column_names
        all.each { |object| csv << object.attributes.values }
      end
    end
  end
end

Version data entries

31 entries across 30 versions & 1 rubygems

Version Path
keppler-2.1.3 installer/core/app/models/concerns/downloadable.rb
keppler-2.1.2 installer/core/app/models/concerns/downloadable.rb
keppler-2.1.1 installer/core/app/models/concerns/downloadable.rb
keppler-2.1.pre.p1 installer/core/app/models/concerns/downloadable.rb
keppler-2.1 installer/core/app/models/concerns/downloadable.rb
keppler-2.0.7 installer/core/app/models/concerns/downloadable.rb
keppler-2.0.6 installer/core/app/models/concerns/downloadable.rb
keppler-2.0.5 installer/core/app/models/concerns/downloadable.rb
keppler-2.0.4.p1 installer/core/app/models/concerns/downloadable.rb
keppler-2.0.4.pre.p1 installer/core/app/models/concerns/downloadable.rb
keppler-2.0.4 installer/core/app/models/concerns/downloadable.rb