diff options
author | Valery Sizov <valery@gitlab.com> | 2015-02-02 21:30:11 -0800 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-02-03 09:10:56 -0800 |
commit | b9d9ac82a9d650b659866ea26dcb4e7987f10381 (patch) | |
tree | a217436ecda22416b0c45d771ae89109738bfc5f /app/controllers/projects/commit_controller.rb | |
parent | 7bf203685210a7484c8deb03d7275e482656e2b3 (diff) | |
download | gitlab-ce-b9d9ac82a9d650b659866ea26dcb4e7987f10381.tar.gz |
Commit page: async load branches info
Conflicts:
config/routes.rb
Diffstat (limited to 'app/controllers/projects/commit_controller.rb')
-rw-r--r-- | app/controllers/projects/commit_controller.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/projects/commit_controller.rb b/app/controllers/projects/commit_controller.rb index 470efbd2114..96a782bdf7a 100644 --- a/app/controllers/projects/commit_controller.rb +++ b/app/controllers/projects/commit_controller.rb @@ -11,8 +11,6 @@ class Projects::CommitController < Projects::ApplicationController return git_not_found! unless @commit @line_notes = @project.notes.for_commit_id(commit.id).inline - @branches = @project.repository.branch_names_contains(commit.id) - @tags = @project.repository.tag_names_contains(commit.id) @diffs = @commit.diffs @note = @project.build_commit_note(commit) @notes_count = @project.notes.for_commit_id(commit.id).count @@ -31,6 +29,12 @@ class Projects::CommitController < Projects::ApplicationController end end + def branches + @branches = @project.repository.branch_names_contains(commit.id) + @tags = @project.repository.tag_names_contains(commit.id) + render layout: false + end + def commit @commit ||= @project.repository.commit(params[:id]) end |