make aspects a link, and remove a big db query from the view

This commit is contained in:
maxwell 2011-02-03 16:15:51 -08:00
parent 9879a6eb99
commit 1ed737c3b9
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@
%b
= link_to t('contacts', :count => contacts.count), edit_aspect_path(aspect), :rel => 'facebox'
%b
= aspect.name
= link_to aspect.name, edit_aspect_path(aspect), :rel => 'facebox'
%br
- if contacts.length > 0

View file

@ -15,4 +15,4 @@
%ul
- for aspect in aspects
= render 'aspects/aspect', :aspect => aspect, :contacts => aspect.contacts.where(:pending => false)
= render 'aspects/aspect', :aspect => aspect, :contacts => aspect.contacts.reject{|x| x.pending == true}