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,
first_name")
@households.each { |@household|
@today = Date.today
@year = @today.year
@thisyear =
Visit.find_all_by_year_and_household_id(Date.today.year,
@household.id)
@lastyear =
Visit.find_all_by_year_and_household_id(Date.today.year-1,
@household.id)
@yearbefore =
Visit.find_all_by_year_and_household_id(Date.today.year-2,
@household.id)
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 Smith <[email protected]>
--
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.