I’m trying to make a behaviour that takes some events with dates from
a ‘showings’ table and puts them on the page.
For events on the same day I only want to show the date once, like this:
Monday
some event
some other event
and yet another event
Tuesday
You get the idea
I’m not sure how to do this…
The behaviour looks like this:
tag “showings:coming” do |tag| content = ‘’
@showings = Showing.all
@showings.each do |showing|
tag.locals.showing = showing
content << tag.expand
end
content
end
tag “showing” do |tag|
tag.expand
end
tag “showing:date” do |tag|
tag.locals.showing.start.strftime("%m/%d/%Y")
end
–
Jeroen