Skip to content

Commit

Permalink
Better way to resolve 'other' projects issue
Browse files Browse the repository at this point in the history
  • Loading branch information
lesniakania committed Dec 14, 2010
1 parent 12bcf6d commit c4a69e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/activities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def load_owner
def load_projects
@recent_projects = current_user.recent_projects
# .all(:order => ["activities.created_at DESC"], :limit => RECENT_ACTIVITIES_NUM)
@other_projects = (Project.active - @recent_projects).sort_by { |p| p.name.downcase }
@other_projects = Project.active.all(:id.not => @recent_projects.map(&:id), :order => [:name])
end

def load_users
Expand Down

0 comments on commit c4a69e1

Please sign in to comment.