prawn_cocktail_rails 0.2.1 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f4c165db87e416f31223f1b040af4bd641cbbeeb
4
- data.tar.gz: b9b76396a68bb5c60b6c6c733f7a67c7f8415e30
2
+ SHA256:
3
+ metadata.gz: ef8156cc6673d1a9cf46289e5321a4a4ccba3fb6592c99ab2a93b929aff4c33b
4
+ data.tar.gz: eb48652b4e495b6336c34a14a92d71cebfb2f566a9aaa7dae9c6418c285ba75c
5
5
  SHA512:
6
- metadata.gz: 7aee4cbec1d15b67aa140d45ed63ff9161cb3ccf17a01122e95a3b8a04dd0c8e32b423aabd4f87d0a56c987c762ff47a705ebb97b5ad24688d80057f6785d883
7
- data.tar.gz: 594286851f72a7e79a4d6555a0726698253bfa957bd374f6513a645e2f2a370bae372c30e24a4ada914c8ceb89c4be8d32c555e2a7b9c18761a2e475dc834b04
6
+ metadata.gz: 7ebe4993941ec855617944660dd4685c2621e43da8d16fb73795895f05e87863e16f807cc6f677010a2978929db28faef0e7cd01006197f31d43bce686a547fb
7
+ data.tar.gz: 644e8fb3b19cb173d4a0d5708f1615a78529f8fa5385811248e1144470a9c28be5ea9634bafdfd244edd03f5efdf8e5a101e3379de85925d3f8daa2fc6280249
data/README.md CHANGED
@@ -20,6 +20,7 @@ class InvoicesController < ApplicationController
20
20
  end
21
21
  ```
22
22
 
23
+ You can change disposition with `send_pdf(document, disposition: "inline")`, without the option it will default to `"attachment"`.
23
24
 
24
25
  It configures PrawnCocktail to look for its views in `app/views/documents`.
25
26
 
@@ -2,11 +2,13 @@ module PrawnCocktailRails
2
2
  module Controller
3
3
  private
4
4
 
5
- def send_pdf(document)
5
+ def send_pdf(document, opts = {})
6
+ disposition = opts.fetch(:disposition, "attachment")
7
+
6
8
  send_data(
7
9
  document.render,
8
10
  type: :pdf,
9
- disposition: "attachment",
11
+ disposition: disposition,
10
12
  filename: document.filename
11
13
  )
12
14
  end
@@ -1,3 +1,3 @@
1
1
  module PrawnCocktailRails
2
- VERSION = "0.2.1"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn_cocktail_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-10 00:00:00.000000000 Z
11
+ date: 2019-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: prawn_cocktail
@@ -82,7 +82,7 @@ files:
82
82
  - lib/prawn_cocktail_rails/controller.rb
83
83
  - lib/prawn_cocktail_rails/railtie.rb
84
84
  - lib/prawn_cocktail_rails/version.rb
85
- - prawn_cocktail.gemspec
85
+ - prawn_cocktail_rails.gemspec
86
86
  - spec/dummy/.gitignore
87
87
  - spec/dummy/Rakefile
88
88
  - spec/dummy/app/controllers/application_controller.rb
@@ -120,8 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.4.5
123
+ rubygems_version: 3.0.3
125
124
  signing_key:
126
125
  specification_version: 4
127
126
  summary: Simple documents, templates and helpers on top of Prawn. In Ruby on Rails.