Commit 1c5a5065 authored by Mike Greiling's avatar Mike Greiling

rename sort method

parent 713e8cf2
...@@ -138,7 +138,7 @@ class CommitStatus < ActiveRecord::Base ...@@ -138,7 +138,7 @@ class CommitStatus < ActiveRecord::Base
.fabricate! .fabricate!
end end
def natsort_name def sortable_name
name.split(/(\d+)/).map do |v| name.split(/(\d+)/).map do |v|
v =~ /\d+/ ? v.to_i : v v =~ /\d+/ ? v.to_i : v
end end
......
- stage = local_assigns.fetch(:stage) - stage = local_assigns.fetch(:stage)
- statuses = stage.statuses.latest - 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 %li.stage-column
.stage-name .stage-name
%a{ name: stage.name } %a{ name: stage.name }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment