mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
revert this change since i'm too tired to figure out what's up with it
This commit is contained in:
parent
a1bb016e48
commit
3caa065724
@ -26,7 +26,26 @@ class CategoriesAndFieldsSerializer
|
||||
old_column_source: field.old_column_source,
|
||||
value: ""
|
||||
}
|
||||
}).sort { |a, b| a[:position] <=> b[:position] }
|
||||
}).sort do |a, b|
|
||||
if a[:position] && b[:position]
|
||||
a[:position] <=> b[:position]
|
||||
|
||||
else
|
||||
a_value = case a[:type]
|
||||
when 'name' then 0
|
||||
when 'universe' then 1
|
||||
else 2 # 'text_area', 'link'
|
||||
end
|
||||
|
||||
b_value = case b[:type]
|
||||
when 'name' then 0
|
||||
when 'universe' then 1
|
||||
else 2
|
||||
end
|
||||
|
||||
a_value <=> b_value
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user