We have this:
<% @shops.each do |shop| %> <%= shop.name %> <% end %>
The code will yield the total res
Just limit it on your ActiveRecord level (or SQL)
limit
@shops = Shop.limit(20) # Rails 3+ @shops = Shop.all :limit => 10 # Rails 2+
Or use Ruby
<% @shops[0,20].each do |shop| %> <%= shop.name %> <% end %>