Tuesday 15 February 2011

ruby on rails - skip carrierwave Integirty and Processing validation -


I've listed some extensions white in the carrier uploader category

  def extension_white_list% W (Doctor docx)   

In some cases I want to skip Integrity Verification while saving a record. But according to their documentation validates_integrity_of verification is present by default.

Can anyone tell me how to leave such recognition? Uploader / file_uploader.rb

Code> def extension_white_list model.do_i_need_validation? % W (doc docx) and% w (pdf) ending

and define this example method in the model

  def do_i_need_validation? Bet? ? True: incorrect end   

Just replace the content of the appropriate method for your app

No comments:

Post a Comment