Not able to save PDF Kit file to a Paperclip attachment in Rails 3.2.15

I am trying to save a pdf file (generated using Rails PDFKit gem) to a paperclip attachment. The MySQL table entry shows following for the paperclip attachment after saving the generated PDF file:

MySQL table record:

The problem is solved. I forgot to add following in model:

has_attached_file :resume_attachment

In addition, I looked at this reference and saved the file in paperclip through File class

 my_model_instance =

 file =

 my_model_instance.attachment = file