Use existing methods for branch names: Ex use @repository.branch_names instead of @repository.heads.map(&:name)

This commit is contained in:
Dmitriy Zaporozhets 2013-03-31 17:08:10 +03:00
parent 025e41576e
commit 71b0f8ea0b
5 changed files with 32 additions and 13 deletions

View file

@ -13,7 +13,7 @@
.mr_branch_box
%h5.cgray From (Head Branch)
.body
.padded= f.select(:source_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'})
.padded= f.select(:source_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
.mr_source_commit
.span2
@ -22,7 +22,7 @@
.mr_branch_box
%h5.cgray To (Base Branch)
.body
.padded= f.select(:target_branch, @repository.heads.map(&:name), { include_blank: "Select branch" }, {class: 'chosen span4'})
.padded= f.select(:target_branch, @repository.branch_names, { include_blank: "Select branch" }, {class: 'chosen span4'})
.mr_target_commit
%fieldset