summaryrefslogtreecommitdiff
path: root/app/controllers/issues_controller.rb
diff options
context:
space:
mode:
authorgitlabhq <m@gitlabhq.com>2011-11-04 11:46:51 -0400
committergitlabhq <m@gitlabhq.com>2011-11-04 11:46:51 -0400
commit8a23682fc5212918c931888bb7b468d167d19c33 (patch)
tree46ebf8219d9e1a5809f6f69d1d249c527d6b9ef2 /app/controllers/issues_controller.rb
parentca1e3d05796484424057d071b726779537868384 (diff)
downloadgitlab-ce-8a23682fc5212918c931888bb7b468d167d19c33.tar.gz
refactored too
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r--app/controllers/issues_controller.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb
index 71c559a1346..b6fd85b848f 100644
--- a/app/controllers/issues_controller.rb
+++ b/app/controllers/issues_controller.rb
@@ -35,8 +35,16 @@ class IssuesController < ApplicationController
end
def show
- @notes = @issue.notes.order("created_at ASC")
+ @notes = @issue.notes.order("created_at DESC").limit(20)
@note = @project.notes.new(:noteable => @issue)
+
+ respond_to do |format|
+ format.html
+ format.js do
+ @notes = @notes.where("id > ?", params[:last_id]) if params[:last_id]
+ @notes = @notes.where("id < ?", params[:first_id]) if params[:first_id]
+ end
+ end
end
def create