summaryrefslogtreecommitdiff
path: root/app/controllers/concerns/notes_actions.rb
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2017-08-07 12:59:34 +0100
committerSean McGivern <sean@gitlab.com>2017-08-07 12:59:34 +0100
commit6f5f7e404997c1b82d30cd3e551245756c21a73f (patch)
tree9cff1eb92208c42ae51552568b0640a6c6c55bdc /app/controllers/concerns/notes_actions.rb
parentfecb1a2f3c77205a72eeff1a3501629d2d1811d8 (diff)
downloadgitlab-ce-6f5f7e404997c1b82d30cd3e551245756c21a73f.tar.gz
Convert ?full_data=1 -> ?view=full_data
Diffstat (limited to 'app/controllers/concerns/notes_actions.rb')
-rw-r--r--app/controllers/concerns/notes_actions.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/concerns/notes_actions.rb b/app/controllers/concerns/notes_actions.rb
index 1d0587aad3a..1809464f4f4 100644
--- a/app/controllers/concerns/notes_actions.rb
+++ b/app/controllers/concerns/notes_actions.rb
@@ -18,7 +18,8 @@ module NotesActions
@notes = prepare_notes_for_rendering(@notes)
notes_json[:notes] =
- if params[:full_data]
+ case params[:view]
+ when 'full_data'
note_serializer.represent(@notes)
else
@notes.map { |note| note_json(note) }
@@ -87,7 +88,8 @@ module NotesActions
if note.persisted?
attrs[:valid] = true
- if params[:full_data]
+ case params[:view]
+ when 'full_data'
attrs.merge!(note_serializer.represent(note))
else
attrs.merge!(