forrest/prawnto — Issue #1: Rails 3.2: uninitialized constant
Author: ylansegal
Created: 2012-01-20 21:17:47+00:00
State: open

First of all, thanks for taking the effort of forking prawnto, since it looks its mantainer is MIA.

I am trying to upgrade my app to rails 3.2 and prawnto completley blows it up, so I am trying your gem.

Following your instructions, I can get rails to try to process the template file, but I get the following:

```
NameError in Admin/packages#labels

Showing /Users/ylansegal/Development/Rails/locum/app/views/admin/packages/labels.pdf.prawn where line #1 raised:

uninitialized constant ActionView::CompiledTemplates::Prawn
Extracted source (around line #1):

1: pdf.start_new_page
2: @packages.each_with_index do |package, index|
3:	pdf.start_new_page if index > 0
4:	pdf.image open(package.label.expiring_url(10)), :position => 0, :vposition => 0 ,:fit => [4*72, 6*72]

```

For refence, here is the controller aciton:

```
# packages_controller.rb
def labels
@order = Order.find(params[:order_id])
@packages = @order.packages.includes(:package_items => {:supplier_variant => :pick_location})
respond_to do |format|
format.pdf {
prawnto :prawn=> {:page_size => [4*72, 6*72], :margin => 0, :skip_page_creation => true}
}
end
end
```
And the complete view:

```
#packages/labels.pdf.prawn NOTE: If I use prawnto here as in your readme, rails doesn't find the template

pdf.start_new_page
@packages.each_with_index do |package, index|
pdf.start_new_page if index > 0
pdf.image open(package.label.expiring_url(10)), :position => 0, :vposition => 0 ,:fit => [4*72, 6*72]
end
```

Your help is greatly appreciated.