remove use of .all on model

This commit is contained in:
Reinier Balt 2013-05-13 12:33:01 +02:00
parent 1234abb266
commit 54b106d96b

View file

@ -68,7 +68,7 @@ class User < ActiveRecord::Base
todos_in_project.reject{ |p| p.todos.active.count > 0 }
sorted_project_ids = todos_in_project.map {|p| p.id}
all_project_ids = all.map {|p| p.id}
all_project_ids = self.map {|p| p.id}
other_project_ids = all_project_ids - sorted_project_ids
update_positions(sorted_project_ids + other_project_ids)