Add ordering for column mappings in repositories

This commit is contained in:
okriuchykhin 2017-07-26 13:35:54 +02:00 committed by GitHub
parent 1f7528d4a4
commit af4b310754

View file

@ -152,7 +152,7 @@ class RepositoryDatatable < AjaxDatatablesRails::Base
# Make mappings of custom columns, so we have same id for every column
i = 5
@columns_mappings = {}
@repository.repository_columns.each do |column|
@repository.repository_columns.order(:id).each do |column|
@columns_mappings[column.id] = i.to_s
i += 1
end