Any way around using only 1 render per action?

My program needs to use a render in a controller action. The problem
is that the action makes a user list and sends it to wicked_pdf, which
uses a render, causing an error if I use one also. Does anyone know a
way around this, and is the render I’m using totally necessary?? Here
is my controller code.

@households = Household.find(:all, :order => "last_name,

@households.each { |@household|
@today =
@year = @today.year
@thisyear =
@lastyear =
@yearbefore =
render( :action=>:printone)
date=date +%Y%m%d-%H:%M
respond_to do |format|
format.pdf { send_data render_to_pdf( :action => ‘print’,
:layout => ‘pdf_report’),
:filename =>
“Household_List_for_” + date }

as the name says, print_one does 1 page of the report for 1 user. It
needs the above variables to do the page.

                                      Thanks for the help

                               Bob S. <[email protected]>

On 2 August 2010 19:26, Bob S. [email protected] wrote:

Does anyone know a way around this

render( :action=>:printone) and return

and is the render I’m using totally necessary??

possibly… but I’m not familiar with “wicked_pdf”, so can’t say for

Are you following whatever guidelines they give in their documentation
for integrating with Rails?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs