Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Looking for Enumerable help I think...
Robert Malko
2/17/2008 6:03:00 AM
I have a piece of code below. I have activities hooked up to a Calendar
but I'm running into a problem I can't wrap my head around. What I'm
trying to achieve is the output: { period: '<%= February 17, 2008 %>',
teaser: ['Activity 1', 'Activity 2'], label: ['']}, if there is more
than on activity for a given day.
I was thinking that I would have to dump the information into an array
and iterator within the teaser: line, but I can't quite figure it.
Any help would be appreciated.
Thanks!
<% @projects.each do |a| %>
<% a.activities.each do |b| %>
{ period: '<%= b.win_at.strftime("%B, %d, %Y") %>', teaser: ['<%=
b.name %>'], label: ['']},
<% end %>
<% end %>
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Looking for Enumerable help I think...
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password