switching the order around to utilize eagerloading

This commit is contained in:
danielgrippi 2011-05-13 16:58:24 -07:00
parent ee49fb3547
commit 30796de400

View file

@ -83,7 +83,7 @@ module AspectGlobalHelper
end
def aspect_dropdown_list_item(aspect, contact, person)
checked = contact.persisted? && aspect.contacts.include?(contact) ? "checked=\"checked\"" : ""
checked = contact.persisted? && contact.aspects.include?(aspect) ? "checked=\"checked\"" : ""
str = "<li data-aspect_id=#{aspect.id}>"
str << "<input #{checked} id=\"in_aspect\" name=\"in_aspect\" type=\"checkbox\" value=\"in_aspect\" />"
str << aspect.name