clean up whitespace from project

This commit is contained in:
Nihad Abbasov 2011-11-15 12:34:30 +04:00
parent 415eddaf39
commit 368deb5992
50 changed files with 356 additions and 413 deletions

View file

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

View file

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

View file

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

View file

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