Add branches and tags Repo methods
Simplifies the actions in RepositoriesController
This commit is contained in:
parent
2df3b310f9
commit
f8c02f6e39
2 changed files with 12 additions and 2 deletions
|
@ -14,11 +14,11 @@ class RepositoriesController < ApplicationController
|
|||
end
|
||||
|
||||
def branches
|
||||
@branches = @project.repo.heads.sort_by(&:name)
|
||||
@branches = @project.branches
|
||||
end
|
||||
|
||||
def tags
|
||||
@tags = @project.repo.tags.sort_by(&:name).reverse
|
||||
@tags = @project.tags
|
||||
end
|
||||
|
||||
def archive
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue