Sha256: 8da7b472ab430de4d4a67b1fdee55e820fcfd1d693c937ee25be64552f622d07

Contents?: true

Size: 310 Bytes

Versions: 2

Compression:

Stored size: 310 Bytes

Contents

class SiteController < ApplicationController
  def report
    @report = PostReport.new(params.fetch(:post_report, {}))
    @csv = Repor::Serializers::CsvSerializer.new(@report)

    respond_to do |format|
      format.html
      format.csv { send_data(csv.csv_text, filename: csv.filename) }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
repor-0.1.0 spec/dummy/app/controllers/site_controller.rb
repor-0.0.5 spec/dummy/app/controllers/site_controller.rb