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.
Related Posts
Google Criticized for Privacy Issues
Ian ‘Hixie’ Hickson, a prominent figure in the Flutter community, has left Google. Despite not being as public as other contributors, …
Llama 2 avoids errors by staying quiet, GPT-4 gives long, if useless, samples
The article discusses a study conducted by computer scientists at the University of California San Diego on the reliability and robustness of large …
NoMethodError (undefined method `finder') with Engines and Rails 2.2
I was getting this error with Rails 2.2 when using ActionMailer.
NoMethodError (undefined method `finder’ for #ActionView::Base:0x34146fc)
It …
