<% @collection = @article.collection %> <% if @collection.present? && @collection.articles.where(published: true).size > 1 %>
<% if @collection.slug.present? %>

Part of "<%= @collection.slug %>" series

<% else %>

Part of a series

<% end %>
<% @collection.articles.where(published: true).order("published_at ASC").each_with_index do |article,i| %> <% end %>
<% end %>