Skip to content

Instantly share code, notes, and snippets.

@Znow
Created July 3, 2011 11:45
Show Gist options
  • Select an option

  • Save Znow/1062176 to your computer and use it in GitHub Desktop.

Select an option

Save Znow/1062176 to your computer and use it in GitHub Desktop.
### side_content view partial
#calendar
%h2#month
= #debug get_date
= link_to "<", :month => (date.beginning_of_month-1).strftime("%Y-%m")
=h date.strftime("%B %Y")
= link_to ">", :month => (date.beginning_of_month+1).strftime("%Y-%m")
= debug Event.all
= debug @events
= debug events
- calendar_for events, :year => date.year, :month => date.month do |t|
=# t.head('Sø', 'Ma', 'Ti', 'On', 'To', 'Fr', 'Lø')
- t.day(:day_method => @events.published_on) do |date, event| #
= date.day
%ul
- event.each do |e|
%li= link_to h(e.title), event
#### Ive tried to created an event method to retrieve the event's of Event.all, since @event did work or anything..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment