clean up whitespace from project
This commit is contained in:
parent
415eddaf39
commit
368deb5992
50 changed files with 356 additions and 413 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue