add sort for refs on creating pull request

This commit is contained in:
Alexander Machehin 2013-07-10 16:44:39 +06:00
parent 6c6b73ada9
commit 6b82036695
1 changed files with 2 additions and 2 deletions

View File

@ -53,8 +53,8 @@ module PullRequestHelper
def ref_selector_options(project, current)
res = []
value = Proc.new {|t| [t.name.truncate(50), t.name]}
res << [I18n.t('layout.git.repositories.branches'), project.repo.branches.map(&value)]
res << [I18n.t('layout.git.repositories.tags'), project.repo.tags.map(&value)]
res << [I18n.t('layout.git.repositories.branches'), project.repo.branches.map(&value).sort]
res << [I18n.t('layout.git.repositories.tags'), project.repo.tags.map(&value).sort]
grouped_options_for_select(res, current)
end