lib/active_admin/menu.rb in activeadmin-1.0.0.pre5 vs lib/active_admin/menu.rb in activeadmin-1.0.0
- old
+ new
@@ -69,10 +69,10 @@
end
# Returns sorted array of menu items that should be displayed in this context.
# Sorts by priority first, then alphabetically by label if needed.
def items(context = nil)
- @children.values.select{ |i| i.display?(context) }.sort do |a,b|
+ @children.values.select{ |i| i.display?(context) }.sort do |a, b|
result = a.priority <=> b.priority
result = a.label(context) <=> b.label(context) if result == 0
result
end
end