Polymathic

Digital transformation, higher education, innovation, technology, professional skills, management, and strategy


Ruby on Rails Calendar Helper doesn’t quite work for me

Geoffrey Grosenbach’s Ruby on Rails plugin calendar_helper is simple and easy to use. Maybe I’m just picky, but one part of it just wasn’t working right for me.

Originally, it looks like this on line 96:

cal << %(<caption class="#{options[:month_name_class]}"></caption><thead><tr><th colspan="7">#{Date::MONTHNAMES[options[:month]]}</th></tr><tr class="#{options[:day_name_class]}">)

It doesn’t really make sense for the month name to be in a TH tag and the caption to be empty. So, I put the month name in the caption and eliminated the extra table row. In the end I changed it to this:

    cal << %(<caption class="#{options[:month_name_class]}">#{Date::MONTHNAMES[options[:month]]}</caption><thead><tr>)

This works well for me. If I knew anything about how to contribute to an open source project, I might propose a patch.



Leave a Reply

Your email address will not be published. Required fields are marked *

About Me

Digital transformation, including agile and devops, across many industries, most recently in higher education. Designed and built the Emory faculty information system. Working in continuing education to improve and expand career-focused learning, esp. in workforce development. Expanding the role of innovation and entrepreneurship. Designed, built, and launched the Emory Center for Innovation.

Favorite sites

  • Daring Fireball

Favorite podcasts

  • Manager Tools

Newsletter

Newsletter