Babos C.lin wrote:
I got a simple iteration going on
<% @user.sender.each do |sender| %>
<% end %>
Can I fetch and display for example only 2 items from my database insted
of all 4 of them ?
Is there a better way to do this ?
I could use will_paginate on the iteration (per_page => 2) but I don`t
want the links to show up.
Which two are you interested in seeing?
The first two, or two with certain attributes. Is this a space issue or
a selection issue?
You could create a named scope I think, then refer to
@user.special_senders.each do |sender|
where the special_senders scope limits the associated senders to only
those you want.