I'm trying to get this plugin to work for me. I'm having the
following issue when I try to render a pdf (/fancy_things/45.pdf )..
Any suggestions?
Thanks!
ERROR:
Started GET "/fancy_things/45.pdf" for 192.168.66.1 at Fri Dec 31
10:59:07 -0500 2010
Processing by OrdersController#show as PDF
Parameters: {"id"=>"45"}
***************WICKED***************
Completed in 4ms
ArgumentError (wrong number of arguments (1 for 0)):
app/controllers/orders_controller.rb:20
app/controllers/orders_controller.rb:9:in `show'
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/
action_dispatch/middleware/templates/rescues/_trace.erb (4.8ms)
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/
action_dispatch/middleware/templates/rescues/_request_and_response.erb
(30.6ms)
Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/
action_dispatch/middleware/templates/rescues/diagnostics.erb within
rescues/layout (49.7ms)
CONTROLLER:
def show
respond_to do |format|
format.html { render 'show' }
format.pdf do
@example_text = "some text"
render :pdf => "file_name",
:template => 'offers/show.pdf.erb',
:layout => 'pdf',
:footer => {
:center => "Center",
:left => "Left",
:right => "Right"
}
end
end
end
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment