revans / calendar
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
calendar /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Wed Apr 02 11:08:30 -0700 2008 | |
| |
LICENSE | Thu Apr 17 23:10:15 -0700 2008 | |
| |
README | Thu Apr 17 23:10:15 -0700 2008 | |
| |
Rakefile | Tue Apr 15 10:10:35 -0700 2008 | |
| |
lib/ | Sat Dec 13 23:55:01 -0800 2008 | |
| |
spec/ | Sat Dec 13 23:55:01 -0800 2008 |
README
Calendar ================= Inspired by Topfunky's CalendarHelper (http://noobonrails.com). Instead of creating the calendar as a helper a module, this is a class that can be extended to suit your viewing needs. I've taken a different approach at providing flexibility where you can override the instance methods. The private methods are methods that really should not be touched as they handle the looping and making sure the calendar looks and acts like a calendar. All public methods are there for the user to extend and or override for their specific needs. Also supported is sending in an array of events to be displayed within the calendar. A few assumptions were made while building this, therefore it has only been tested within: Merb 0.9.2 DataMapper 0.3.0 (I will be testing it against dm-core 0.9, shortly) When passing Events, you have a start_date that is a DateTime Object (This will most likely change to a Time Object for better performance) and you have a name for the event (event.name). You can overload check_for_todays_events(date) and write your own to work with your own setup. This is still in development, obviously as I have neglected to add specs yet. That's next on my plate for this. TODO: * Write Specs * Provide Clean Hook for Next/Previous Month cycling * Sample write up with examples of how to overload some of the more "often used" methods for printing out the calendar. * Test with dm-core 0.9.0 * Change from DateTime to Time for performance
