我有一个用虾生成pdf的动作
def savepdfs
respond_to do |format|
format.pdf {} # Create PDF file and saves in /pdf/print.pdf.
logger.info "::::::::::::::::: PDF COVER PAGE CREATED :::::::::::::::::"
end
end
我不想向用户显示 pdf。相反,我只想从另一个动作中调用它
def mainaction
#I want to call something like savepdfs(:format => :pdf)
end
我该怎么做呢 ?