Convert to array since Relation no longer returns an array.

This commit is contained in:
Marin Jankovski 2014-06-02 11:28:32 +02:00
parent 1dca950c28
commit 7bf64b2648

View file

@ -217,6 +217,6 @@ class ProjectsController < ApplicationController
end
def sorted(users)
users.uniq.compact.sort_by(&:username).map { |user| { username: user.username, name: user.name } }
users.uniq.to_a.compact.sort_by(&:username).map { |user| { username: user.username, name: user.name } }
end
end