Add JSON response for paste-uploads
This commit is contained in:
parent
a8325e4833
commit
6542ffbc19
2 changed files with 9 additions and 4 deletions
|
|
@ -111,8 +111,13 @@ class PackagesController < ApplicationController
|
|||
# TODO
|
||||
# if @invalid_images…
|
||||
# ' #{image.image_file_name} (#{image.errors[:image].join(' and ')})
|
||||
|
||||
redirect_to package_path
|
||||
|
||||
respond_to do |format|
|
||||
format.html { redirect_to package_path }
|
||||
# TODO: send all_errors back as JSON and make Javascript display it in #messages
|
||||
format.json { render :json => true }
|
||||
end
|
||||
|
||||
# render :details
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue