rename sort method
This commit is contained in:
parent
713e8cf2eb
commit
1c5a506588
|
@ -138,7 +138,7 @@ class CommitStatus < ActiveRecord::Base
|
|||
.fabricate!
|
||||
end
|
||||
|
||||
def natsort_name
|
||||
def sortable_name
|
||||
name.split(/(\d+)/).map do |v|
|
||||
v =~ /\d+/ ? v.to_i : v
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
- stage = local_assigns.fetch(:stage)
|
||||
- statuses = stage.statuses.latest
|
||||
- status_groups = statuses.sort_by(&:natsort_name).group_by(&:group_name)
|
||||
- status_groups = statuses.sort_by(&:sortable_name).group_by(&:group_name)
|
||||
%li.stage-column
|
||||
.stage-name
|
||||
%a{ name: stage.name }
|
||||
|
|
Loading…
Reference in New Issue