Thanks,
so the solution is, just for everyone else facing the same proplems,
(at least I hope):
Write a helper method
def birthday_helper (number_of_resutls)
costumers_with_upcoming_birhtday = Costumer.find_near_birthday
costumers_with_upcoming_birhtday= costumers_with_upcoming_birhtday
[0..number_of_resutls]
end
and then call it from the view
<% birthday_helper(10).each do |costumer| %>
<tr>
<td><%=link_to costumer.last_name, costumer %></td>
<td><%=link_to costumer.birthday, costumer %></td>
<br />
</tr>
<% end %>
Thanks for the help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---