everybody I\'m brand new with Ruby on Rails and I need to understand something. I have an instance variable (@users) and I need to loop over it inside an html.erb file a limitat
Why don't you limit the users?
<%= @users.limit(10).each do |user| %> ... <%end%>
That'd still use ActiveRecord so you get the benefit of AR functions. You can also do a number of things too such as:
@users.first(10) or @users.last(10)
@users.first(10)
@users.last(10)