Skip to content
An eample showing fullcalendar running with Rails 3.2, all bundled up as a nice and tidy asset gem
Ruby CoffeeScript JavaScript
Failed to load latest commit information.
app updating to rails 3.2.13 and the new version of fullcalendar. Jun 2, 2013
bin committing the consequences of my bundle install Mar 21, 2012
config
db adding an event resource. Mar 21, 2012
doc initial generation of a rails 3.2 app Mar 21, 2012
lib initial generation of a rails 3.2 app Mar 21, 2012
log initial generation of a rails 3.2 app Mar 21, 2012
public making the root url do something useful Mar 21, 2012
script
test restoring a test that broken when I renamed the singular controller Mar 21, 2012
vendor initial generation of a rails 3.2 app Mar 21, 2012
.gitignore ignoring the schema.rb file, as good CM practices dictate. Mar 21, 2012
Gemfile
Gemfile.lock
README.rdoc adding a readme Mar 22, 2012
Rakefile initial generation of a rails 3.2 app Mar 21, 2012
config.ru initial generation of a rails 3.2 app Mar 21, 2012

README.rdoc

Using fullCalendar with Rails 3.2

I recently made several asset gems out of the FullCalendar and the jquery.rest plugins. This is a simple example to see them in action. Take a look at the GemFile and the application.js and application.css files to see those in action.

Fullcalendar is an awesome jquery calendar. You can see it in action at this url:

arshaw.com/fullcalendar/

This is an example of how to use it with Rails.

Here's the gist… You can follow along commit-by-commit with the checkin comments; they explain everything pretty well.

  • started with a stock Rails 3.2 app

  • added my asset gems to add full calendar and jquery.rest into the mix

  • created an event model and controller as stock scaffolding, then modified the controller slightly to accept the query parameters for ranges that FullCalendar will throw at it.

  • created a controller/view for the calendar, but its pretty much just an empty div that FullCalendar enhances.

  • glued it all together with the javascript in app/assets/javascripts/calendar.js.coffee

Yes, the UI for the events is just scaffolding. I might pretty it up in the future, but the whole point of this exercise is a minimal example of using those two gems.

I had previously done this with Rails 3 at the rails3_fullcalendar repo of mine; that has now been OBE by this repo.

Have fun.

–Running this on your own machine.

  • check it out.

  • bundle

  • migrate

  • start the app

  • look at it in a browser

Something went wrong with that request. Please try again.