I'm not sure I can factorize these two if because the condition "if @contacts_size > 0 && @contacts_size < 20" is only for the "start_a_conversation" link. The others have to be displayed *but* we have to test that we are on an aspect page with "- if @aspect". We don't do that for the second "if @contacts_size > 0". So unless there is a special syntax in ruby I'm not aware of I don't see how I can regroup them.