refactored too

This commit is contained in:
gitlabhq 2011-11-04 11:46:51 -04:00
parent ca1e3d0579
commit 8a23682fc5
11 changed files with 56 additions and 53 deletions

View file

@ -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