Skip to content

Instantly share code, notes, and snippets.

@clemens
Created April 30, 2009 14:48
Show Gist options
  • Save clemens/104481 to your computer and use it in GitHub Desktop.
Save clemens/104481 to your computer and use it in GitHub Desktop.
def calendar_proc
lambda do |day|
content = returning '' do |content|
content << content_tag(:span, day.day)
content << "<ul>"
Event.all.select { |e| e.on_day?(day) }.each do |event|
content << content_tag(:li, link_to(event.title, event_path(event))
end
content << "</ul>"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment