Navigation Menu

Skip to content

Commit

Permalink
fix problem with uploads from safari
Browse files Browse the repository at this point in the history
Signed-off-by: trebor8x <trobbe@online.de>
  • Loading branch information
grobie authored and trebor8x committed Jul 31, 2009
1 parent 2ac0eff commit 56e0db1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/controllers/invoices_controller.rb
Expand Up @@ -34,14 +34,15 @@ def create
end
end
end

def update
@invoice = Invoice.find(params[:id])
@pdf = Pdf.new(params[:pdf])
@doc = Doc.new(params[:doc])
if params[:pdf]["uploaded_data"] != ""
if params[:pdf] && params[:pdf]["uploaded_data"] != ""
@invoice.pdf = @pdf
end
if params[:doc]["uploaded_data"] != ""
if params[:doc] && params[:doc]["uploaded_data"] != ""
@invoice.doc = @doc
end
respond_to do |format|
Expand Down

0 comments on commit 56e0db1

Please sign in to comment.