Skip to content

Commit

Permalink
Fix args not being passed to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Whoops committed Oct 23, 2010
1 parent 2c09600 commit cb306da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/prawn_rails.rb
Expand Up @@ -8,7 +8,7 @@ module Rails
module PrawnHelper module PrawnHelper


def prawn_document(opts={}) def prawn_document(opts={})
pdf = (opts.delete(:renderer) || Prawn::Document).new pdf = (opts.delete(:renderer) || Prawn::Document).new(opts)
yield pdf if block_given? yield pdf if block_given?


pdf pdf
Expand All @@ -30,4 +30,4 @@ def self.call(template)


Mime::Type.register_alias "application/pdf", :pdf Mime::Type.register_alias "application/pdf", :pdf
ActionView::Template.register_template_handler(:prawn, Prawn::Rails::TemplateHandler) ActionView::Template.register_template_handler(:prawn, Prawn::Rails::TemplateHandler)
ActionView::Base.send(:include, Prawn::Rails::PrawnHelper) ActionView::Base.send(:include, Prawn::Rails::PrawnHelper)

0 comments on commit cb306da

Please sign in to comment.