Has anyone used FullCalendar(
http://arshaw.com/fullcalendar/) with Ramaze? I'm can't get it to show the events I'm passing back (AJAX) from my controller. I'm definitely getting the request. Here's the controller code:
def show_calendar
@page_javascript = 'show_calendar'
if request.xhr? # came from ajax request
# Create a JSON "object" of the choice that can in through the post
# request and the current time. For the time, we need to enclose it
# in double quotes so that it will be interpreted as a string.
# "{ choice: #{request['choice']}, time: \"#{Time.now}\" }"
Ramaze::Log.debug("show_calendar: Have an Ajax request start: #{request['start']} end: #{request['end']}")
# "{ id: 1, title: \"Event1\", start: \"2009-09-15\" }"
Ramaze::Log.debug("#{JSON.pretty_generate([{"id"=>1, "title" => "Event1", "start" => "2009-09-15"}])}")
json = JSON.generate [{"id"=>1, "title" => "Event1", "start" => "2009-09-15"}]
return json
end
end
You can see I've tried a couple of different ways of passing (straight string and then using the JSON plugin).
Any ideas?
--
Scott
http://steamcode.blogspot.com/