David Ng
Joined 1/27/2019
David Ng said over 4 years ago on FullCalendar Events and Scheduling :
Dear Kobaltz ,

I did the calendar in my Rails 5.2 app.  However, when I try to do fullCalendar again in Rails 6 with web pack, things are broken down.  I simply can't get it work.  I got some funny errors and simply can't get the Model right.

Any chance to redo fullCalendar for Rails 6 ?

David

David Ng said over 4 years ago on FullCalendar Events and Scheduling :
I did it with pack and encounter some "funny" errors.   I got the index display working but can't get New/Create model work.  

I need full implementation of fullCalendar, any chance you do it all ? 
 

David Ng said over 4 years ago on Two Factor Authentication :
I got this error, how does opt_code work?  


Showing /home/davidnghk/App6/fc4s/code/app/views/devise/sessions/new.html.erb where line #15 raised:

undefined method `otp_code_token' for #<User:0x00005611ff730138>
Did you mean?  otp_code

David Ng said over 4 years ago on Two Factor Authentication :
Showing /home/davidnghk/App6/fc4s/code/app/views/devise/registrations/edit.html.erb where line #91 raised:

undefined method `dark?' for #<RQRCode::QRCode:0x00007f8f111d7200>


<tr> <% qr.modules.each_index do |y| %> <% if qr.dark?(x,y) %> <td class="black"/> <% else %> <td class="white"/>

David Ng said over 4 years ago on Creating PDF files with WickedPDF :
Hi, I am trying to add header and footer to the pdf file, but not luck. My controller code :?

//app/contollers/ sales_controller.rb

  def show
    respond_to do |format|
      format.html {}
      format.pdf do
        html = render_to_string(
          template: 'sales/show.pdf.erb', 
          page_size: 'A4',
          margin: { bottom: 25 },
          footer: {
            content: render_to_string('shared/footer')
          }
          layout: 'layouts/application.pdf.erb')
        pdf = WickedPdf.new.pdf_from_string(html)
        send_data(pdf, filename: "sale-#{@sale.our_ref}.pdf", type: 'application/pdf', 
          disposition: :attachment)
      end
    end
  end

// # app/view/shared/footer.html
PRD Footer
....

What is wrong ?