abstractryan@gmail.com
2006-Jul-20 14:05 UTC
[Rails] RJS and calendar_helper troubles .... tab characters covering web page
We have implemented calendar_helper.rb to generate an ajaxified calendar
using rjs templates. Everything worked fine until we added a drop down to
select the current month. Now when select a month and the calendar refreshes
to that selected month we get a ton of ''\t'' displayed all over
the page
inside what looks like to be a javascript debug print statement ( try {}
catch{} block ).
We tried everything and cannot seem to resolve. Anyone have any ideas? below
are snippets:
calendar_controller.rb
def modify_month_view
set_calendar_dropdowns(request.raw_post, ''2006'')
modify_month_view.rjs
page.replace_html ''embed_calendar'', :partial =>
''shared/calendar'',
:year => 2006, :month => 5
shared/_calendar.rhtml partial
<hr>
<% calendar({:year => 2006, :month =>
11, :table_class =>
"my_calendar_helper"}) do |d|
cell_text = "#{d.mday}<br />"
cell_attrs = {:class => ''my_day''}
@events.each do |e|
if e.tour_start_date == d
cell_text << e.label << "<br
/>"
cell_attrs[:class] = ''specialDay''
end
end
[cell_text, cell_attrs]
end
%>
thanks for any help!
Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060720/6003aa80/attachment-0001.html
