You have <%= pluralize(@people.invitations.size, 'Invitations') rescue '0 Invitations' -%>. <% if @people and !@people.invitations.empty? -%><%= link_to_function 'Send Invitation', "lightboxes['invitation_dialog'].open()" -%><% end -%>