Hi guys,

can someone help me with this challenge. I'd like to be able to save reviewforms from my app to PDF files. I'm struggling because there is no explicit examples, but I try to derive the correct way from rails examples.

So, I've made this:

I've created a separate controller for showing a reviewform in a PDF format:

  class ShowPdfN
    def get(form_id)
      if @state.username
        @reviewform = Reviewform.find(form_id)
        render :showpdf
      else
        redirect Login
      end
    end
  end
--------------------------------------------------------
And the view with basic stuff:

  def showpdf
    pdf = Prawn::Document.new
    pdf.text "#{@reviewform.title}"
  end

When I wisit http://localhost:3301/show/pdf/1 there is nothing to display.

Any ideas?

regards,
seba
_______________________________________________
Camping-list mailing list
Camping-list@rubyforge.org
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to