diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-27 14:14:20 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-27 14:14:20 +0000 |
commit | dfd15596a4b53ba2b7b3d0be9d5c17e2d7824c8f (patch) | |
tree | 21e843dcc9ac0f33ee34dbe897be0a482c43472d /app/controllers/concerns/issuable_actions.rb | |
parent | ead12a90afbff0a750883583e2474ad24f83c9d8 (diff) | |
parent | 0d000d351ca587ff7a6d4a14ad3cfa693238eec0 (diff) | |
download | gitlab-ce-dfd15596a4b53ba2b7b3d0be9d5c17e2d7824c8f.tar.gz |
Merge branch 'issue_24815' into 'master'
fix ERR_CONTENT_LENGTH_MISMATCH on task checkboxes
See merge request !8567
Diffstat (limited to 'app/controllers/concerns/issuable_actions.rb')
-rw-r--r-- | app/controllers/concerns/issuable_actions.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/controllers/concerns/issuable_actions.rb b/app/controllers/concerns/issuable_actions.rb index 0821974aa93..3ccf2a9ce33 100644 --- a/app/controllers/concerns/issuable_actions.rb +++ b/app/controllers/concerns/issuable_actions.rb @@ -26,6 +26,23 @@ module IssuableActions private + def render_conflict_response + respond_to do |format| + format.html do + @conflict = true + render :edit + end + + format.json do + render json: { + errors: [ + "Someone edited this #{issuable.human_class_name} at the same time you did. Please refresh your browser and make sure your changes will not unintentionally remove theirs." + ] + }, status: 409 + end + end + end + def labels @labels ||= LabelsFinder.new(current_user, project_id: @project.id).execute end |