added unique filter to categories
This commit is contained in:
parent
46df9d3954
commit
87b382bf3a
|
@ -19,6 +19,7 @@ class Admin::TicketsController < OrbitAdminController
|
|||
else
|
||||
@categories = authorizations.collect{|authorization| authorization.category}
|
||||
@categories.delete(nil)
|
||||
@categories.uniq!
|
||||
@categories.each do |category|
|
||||
temp = Ticket.where(:category_id => category.id).open.not_urgent.limit(5).asc(:created_at)
|
||||
@tickets[category] = temp if temp.count > 0
|
||||
|
|
Loading…
Reference in New Issue