daily pastebin goal


a guest May 16th, 2018 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def create
  2.     if @offer.editable? && @offer.revisionable?
  3.       @offer_revision = @offer.revisions.build(params[:offer_revision].merge(:uploaded => false))
  4.       if @offer_revision.save_and_generate_document
  5.         flash[:notice] = 'Revisión generada correctamente.'
  6.       else
  7.         render :action => 'new' and return
  8.       end
  9.     else
  10.       flash[:notice] = 'No se puede crear una revisión nueva.' unless @offer.editable?
  11.       flash[:notice] = 'La oferta no está completamente definida, revisar variables.' unless @offer.revisionable?
  12.     end
  13.     redirect_to offers_url
  14.   end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand