Sha256: 74d4b527fc9a25ce4bdf8f5888bf2c32db6b1ef0c588ee174fe3abe4086e727f

Contents?: true

Size: 517 Bytes

Versions: 4

Compression:

Stored size: 517 Bytes

Contents

class ReportsController < ApplicationController

  def sample
    @items = [
      {name: "Hello"},
      {name: "World"},
    ]
  end

  def table
    @items = [
      [1,2,3],
      [4,5,6],
      [7,8,9],
    ]
  end

  def custom_filename
  end

  def custom_disposition
  end

  def custom
  end

  def ivar_filename
    @filename = "ivar-filename.pdf"
    render :custom
  end

  def custom_headers
    headers['Content-Disposition'] = "attachment;filename=\"custom-headers.pdf\""
    render :custom
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
prawn-rails-1.4.2 test/dummy_app/app/controllers/reports_controller.rb
prawn-rails-1.4.1 test/dummy_app/app/controllers/reports_controller.rb
prawn-rails-1.4.0 test/dummy_app/app/controllers/reports_controller.rb
prawn-rails-1.3.0 test/dummy_app/app/controllers/reports_controller.rb