clemens (owner)

Revisions

gist: 104481 Download_button fork
public
Public Clone URL: git://gist.github.com/104481.git
Embed All Files: show embed
Ruby #
1
2
3
4
5
6
7
8
9
10
11
12
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