denisjacquemin
denisjacquemin

Reputation: 7414

Pdf generation with Rails 3

I need to generate PDFs with Rails 3.0.3.

Prawn + Prawnto looks great as showed by Ryan Bates

But I cannot make his example works, the table function is not recognized by the pdf variable

Any insight on this problem?

Thanks

Upvotes: 3

Views: 1888

Answers (2)

user596916
user596916

Reputation: 116

open up prawn-core-0.8.4\lib\prawn\core.rb

at the bottom of that file you will see a list of all the 'require' items. I think this is where you should add require 'prawn/layout' if you do not want it in your views. still not ideal as you are customising the plugin.

Upvotes: 1

denisjacquemin
denisjacquemin

Reputation: 7414

I found a quick fix, but not really happy with it...

adding require 'prawn/layout' to my view fix the problem

Upvotes: 0

Related Questions