How to convert as pdf using payday gemfile in rails -


I am using payday gem and I write coding in controller and my code
 

code> class is pdf controller & lt; ApplicationController Def Indexes feedback_to do | Format | format.html format.pdf dispatch_data invoice. Render_PDF ,: filename = & gt; "Invoice # 12.pdf" ,: type = & gt; "App / PDF" ,: Nature => "Inline" and end

I do not know what to do next, any thoughts

You forgot to initialize invoice instances.

  Invoice = Payday :: Invoice.New (: Invoice_Number => 12) Invoice.line_imes & lt; & Lt; LineItem.new (: value = & gt; 20 ,: Qty => 5 ,: Description = & gt; "Pants") Invoice. Line_ights & lt; & Lt; LineItem.new (: value = & gt; 10 ,: Qty => 3 ,: Description = & gt; "Shirts") Invoice. Line_ights & lt; & Lt; LineItem.new (: value = & gt; 5, quantity = & gt; 200 ,: description = & gt; "salute") Invoice .render_pdf_to_file ("/ path / to_file.pdf")   

The above code is only an example given in Paid Docs.

Comments

Popular posts from this blog

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -