Forum: Ruby on Rails Adding link to Calendar Helper

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
David (Guest)
on 2009-01-06 00:23
(Received via mailing list)
Im wondering if there is a way to add a link with the html <span> or
<a> tag in the calendar helper plugin:
I am able to add links using the link_to helper, but I would like to
be able to add a link using one of the html tags so that I can add a
css class to it.

I am trying to add a popup link to each day of the calendar using the
DOM popup kit which constructs the popups using the following format:

<span id="test_popup_link" class="popup_link">Testing</span>

Does anyone know where I can put this code into the calendar helper?
It seems that the cell_text container rejects this code, so I am
thinking I am going to have to add it directly into the
calendar_helper.rb file itself.  Thanks for any help, Im pretty much
stuck right now.
David (Guest)
on 2009-01-06 23:49
(Received via mailing list)
This is really random, but I figured out the problem.  Rails chokes on
double quotes, so you have precede them with a slash:
(this code is specific to integrating the DOM popup kit with the
calendar helper plugin)

cell_text << "<a id=\"test_popup_link_#{@day}\" class=\"popup_link
\">Click here for popup</a>"
This topic is locked and can not be replied to.