Rails 3 Full_Calendar [英] Rails 3 Full_Calendar
问题描述
有人知道在 Rails 3 fullcalendar 上是否有逐步集成Rails的分步教程.到现有的Rails应用程序中?我看了看文档,实现了我所能做到的,但是作为一个新手,我不确定我可能会出问题的地方...我基本上是在看是否有人做过并分享了他们的经验?
Does anyone know if there is a step-by-step tutorial for intergrating Rails on Rails 3 fullcalendar into an existing Rails app? I have looked at the documentation, implemented what I can, but as a newbie unsure where I may be going wrong... I'm basically looking to see if anyone else has done it and shared their experiences?
推荐答案
You just need to have the JavaScript files in your asset pipeline. You should put it to /vendor/assets/javascripts/fullcalendar
and then include it in your application.js
via
//= require_tree ./fullcalendar
[...other scripts]
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
// put your options and callbacks here
})
});
在您看来,您必须包括以下元素才能将日历放置在其中:
In your view you have to include the following element to place the calendar there:
<div id='calendar'></div>
只需尝试一下.这并不难.再次询问您是否还有更具体的问题.
Just try it. It is not that hard. Ask again if you have more specific questions.
这篇关于Rails 3 Full_Calendar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!