summaryrefslogtreecommitdiffstats
path: root/app/controllers/attachments_controller.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-01 12:46:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-10-01 12:46:29 +0000
commita2bcc9c40eb99b901f2f92b2f4fa1f840583c6b8 (patch)
treed49d79b7112da8fb8872fedceac4b6261da9a7d2 /app/controllers/attachments_controller.rb
parent973c9484b091e7554f8cd78fdb3f640aa364f7ce (diff)
downloadredmine-a2bcc9c40eb99b901f2f92b2f4fa1f840583c6b8.tar.gz
redmine-a2bcc9c40eb99b901f2f92b2f4fa1f840583c6b8.zip
Rename AttachmentsController#edit and #update to #edit_all and #update_all (#22356).
git-svn-id: http://svn.redmine.org/redmine/trunk@15860 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/attachments_controller.rb')
-rw-r--r--app/controllers/attachments_controller.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/app/controllers/attachments_controller.rb b/app/controllers/attachments_controller.rb
index 19a51b9cc..f002c907c 100644
--- a/app/controllers/attachments_controller.rb
+++ b/app/controllers/attachments_controller.rb
@@ -17,7 +17,7 @@
class AttachmentsController < ApplicationController
before_action :find_attachment, :only => [:show, :download, :thumbnail, :destroy]
- before_action :find_editable_attachments, :only => [:edit, :update]
+ before_action :find_editable_attachments, :only => [:edit_all, :update_all]
before_action :file_readable, :read_authorize, :only => [:show, :download, :thumbnail]
before_action :delete_authorize, :only => :destroy
before_action :authorize_global, :only => :upload
@@ -26,7 +26,7 @@ class AttachmentsController < ApplicationController
# MIME type text/javascript.
skip_after_filter :verify_same_origin_request, :only => :download
- accept_api_auth :show, :download, :thumbnail, :upload, :destroy
+ accept_api_auth :show, :download, :thumbnail, :upload, :update, :destroy
def show
respond_to do |format|
@@ -107,17 +107,19 @@ class AttachmentsController < ApplicationController
end
end
- def edit
+ # Edit all the attachments of a container
+ def edit_all
end
- def update
+ # Update all the attachments of a container
+ def update_all
if params[:attachments].is_a?(Hash)
if Attachment.update_attachments(@attachments, params[:attachments])
redirect_back_or_default home_path
return
end
end
- render :action => 'edit'
+ render :action => 'edit_all'
end
def destroy