summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/application_controller.rb4
-rw-r--r--app/controllers/commits_controller.rb1
-rw-r--r--app/controllers/projects_controller.rb4
-rw-r--r--app/controllers/tags_controller.rb16
4 files changed, 12 insertions, 13 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 2580f84ea6d..95d94035448 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -79,8 +79,8 @@ class ApplicationController < ActionController::Base
elsif params[:last_id]
@notes = @notes.where("id > ?", params[:last_id])
elsif params[:first_id]
- @notes = @notes.where("id < ?", params[:first_id])
- else
+ @notes = @notes.where("id < ?", params[:first_id])
+ else
nil
end
end
diff --git a/app/controllers/commits_controller.rb b/app/controllers/commits_controller.rb
index fc3d34ba184..7ca5e3bf7ca 100644
--- a/app/controllers/commits_controller.rb
+++ b/app/controllers/commits_controller.rb
@@ -10,7 +10,6 @@ class CommitsController < ApplicationController
before_filter :require_non_empty_project
before_filter :load_refs, :only => :index # load @branch, @tag & @ref
-
def index
@repo = project.repo
limit, offset = (params[:limit] || 20), (params[:offset] || 0)
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 350bf70d310..566f8f2974c 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -79,7 +79,7 @@ class ProjectsController < ApplicationController
@notes = @project.common_notes.order("created_at DESC")
@notes = @notes.fresh.limit(20)
- respond_to do |format|
+ respond_to do |format|
format.html
format.js { respond_with_notes }
end
@@ -168,7 +168,7 @@ class ProjectsController < ApplicationController
def add_refs(commit, ref_cache)
if ref_cache.empty?
- @repo.refs.each do |ref|
+ @repo.refs.each do |ref|
ref_cache[ref.commit.id] ||= []
ref_cache[ref.commit.id] << ref
end
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 913bc62bd15..938beb64403 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -1,11 +1,11 @@
class TagsController < ApplicationController
- def index
- @tags = Project.tag_counts.order('count DESC')
- @tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank?
+ def index
+ @tags = Project.tag_counts.order('count DESC')
+ @tags = @tags.where('name like ?', "%#{params[:term]}%") unless params[:term].blank?
- respond_to do |format|
- format.html
- format.json { render json: @tags.limit(8).map {|t| t.name}}
- end
- end
+ respond_to do |format|
+ format.html
+ format.json { render json: @tags.limit(8).map {|t| t.name}}
+ end
+ end
end