This code shows all the records of CommunityTopic that belongs to current Community. How can I limit the numbers to 10 records to display here?
<ul>
<% @community.community_topics.each do |topic| %>
<li>
<%= link_to topic.title, community_topic_path(@community, topic) %>
<%= link_to topic.user.user_profile.nickname, community_topic_path(@community, topic) %>
</li>
<% end %>
</ul>