Input '>' character into html builder array

I’m using an html calendar builder and am getting a compile error when
trying to input a close to some ruby code into the cell_input:
cell_text << “%>”, it seems that it is choking on the closing > sign.
Is there any way to escape this?

I could really use some help here, not sure how to search for
information on this. Thanks.
This is the line that I am having issues with:

cell_text << “%>”

This is the error output:

ActionView::TemplateError (compile error
syntax error, unexpected $undefined, expecting kEND
…<< “).to_s); erbout.concat “”\n \n \n\n\n [cell_text,…
syntax error, unexpected $end, expecting ‘)’) on line #37 of users/
35: cell_text << "<%= "
36: cell_text << "javascript_tag "new Popup('test_popup
#{@day}’,{position:‘25%,30%’, trigger:‘click’,
37: cell_text << “%>”

I was having a similar compile issue with inputting double quotes into
the cell_text array and was able to use \ to avoid any problems:

cell_text << “<div id=“test_popup_#{@day}” class=“cal_popup” style=

On 14 Jan 2009, at 03:50, David wrote:

cell_text << “%>”

<% and %> are special in erb. You need to use <%% and %%> to include
literal <% and %>
Or avoid the whole lot by putting it in a helper.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs