Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-09-14 18:52:24 +0400
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-09-14 23:41:56 +0400
commite802d00996d6948e29f085d4de9409423e0d91a4 (patch)
tree20b5a06905c0f482aadb9ff71a4e719cb4777588 /app/contexts
parent14164017533388dc2a0d0f43e05ee84badbf2223 (diff)
Completely redo loading of notes with JS
Diffstat (limited to 'app/contexts')
-rw-r--r--app/contexts/notes/load_context.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/contexts/notes/load_context.rb b/app/contexts/notes/load_context.rb
index c026fc50a29..c2d7644b6ba 100644
--- a/app/contexts/notes/load_context.rb
+++ b/app/contexts/notes/load_context.rb
@@ -3,8 +3,7 @@ module Notes
def execute
target_type = params[:target_type]
target_id = params[:target_id]
- first_id = params[:first_id]
- last_id = params[:last_id]
+ after_id = params[:after_id]
@notes = case target_type
@@ -23,10 +22,8 @@ module Notes
project.wikis.reverse.map {|w| w.notes.fresh }.flatten[0..20]
end
- @notes = if last_id
- @notes.where("id < ?", last_id)
- elsif first_id
- @notes.where("id > ?", first_id)
+ @notes = if after_id
+ @notes.where("id > ?", after_id)
else
@notes
end