Ok, I had a lot of issues with this too, so I will just put all the 
steps I used to get it to work.

#SETUP
#though I'm sure bundler would be better for this
Installed Prawn gem
config.gem 'prawn', :version => '0.6.3'

Installed Prawnto plugin
./script/plugin install git://github.com/thorny-sun/prawnto.git


#Routes
map.with_options(:controller => 'admin/reports') do |m|
m.admin_marketing_report 'admin/marketing', :controller => 
'admin/reports', :action => 'marketing'
end

#Controller
class Admin::ReportsController < AdminController
  def marketing
    respond_to do |format|
      format.pdf do
        @advertisements = Advertisement.all
      end
    end
  end
end


#VIEW
/admin/reports/marketing.prf.prawn
pdf.text "Marketing Report", :size => 18, :style => :bold



Hopefully this will help you out.

~Jeremy
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to