GithubHelp home page GithubHelp logo

ljrpicasso / rails3_fullcalendar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sledge/rails3_fullcalendar

0.0 2.0 0.0 201 KB

an example application showing integration with JQuery's fullcalendar and Rails3

Home Page: http://www.codesherpas.com

rails3_fullcalendar's Introduction

== Rails3 fullcalendar example

This is an example application showing how to use the JQuery FullCalendar plugin with Rails3, following RESTful rails practices as closely as possible, and forgoing 'cleverness' for clarity.

http://arshaw.com/fullcalendar/

Fullcalendar is a great ajaxy calendar... there are several examples on that page, and downloadable with the project.  Integration with rails is not overly complicated, but a sample project that can be dissected is really helpful in getting all the moving parts worked out.  This project will eventually include detailed instructions of how it came together, and I might even record a screencast on it.  Until then, notable things:

- This is a Rails 3.0.6 app created using the JQuery template, as so:
rails new calendar -m https://github.com/lleger/Rails-3-jQuery/raw/master/jquery.rb


- this is built with fullcalendar-1.5, as downloaded with wget:

wget http://arshaw.com/fullcalendar/downloads/fullcalendar-1.5.zip


after having both in the same directory, I unzipped fullcalendar and ran the following commands to move over the javascript, css, and demo assets:

mv fullcalendar-1.5/jquery/jquery-ui-1.8.9.custom.min.js calendar/public/javascripts/
mv fullcalendar-1.5/demos calendar/public/
mv fullcalendar-1.5/fullcalendar/*.css calendar/public/stylesheets/


at this point you can adjust the paths to javascript and css in the demo files, and see them work with the files being served up from rails.  At this point, it doesn't actually *do* anything with rails yet - you have to wire up a bunch of stuff - which is what this project walks you through.


In order to simplify communication between the fullcalendar and the rails application that is actually serving up the events to put on the calendar, I'm using the jquery.REST plugin:

http://lyconic.com/blog/2010/08/03/dry-up-your-ajax-code-with-the-jquery-rest-plugin
https://github.com/lyconic/jquery.rest


This project does not currently support recurring events - doing so would overcomplicate the simple examples I want to make here.

There will eventually be branches that support recurring events as well as multiple calendars (and displaying multiple calendar events on the same fullcalendar in different colors, now that fullcalendar 2.5 supports that)


This project was inspired by an earlier attempt to do the same thing.  https://github.com/vinsol/fullcalendar_rails demonstrates an older calendar integrations with Rails2; however it doesn't live up to Rails' RESTful ideals, and complicates the example with other uses of ajax and a more complex domain model to support recurring events.  It is still a useful project, and kudos to vinsol for sharing it; it definitely made this Rails3 version easier

rails3_fullcalendar's People

Contributors

bokmann avatar russfrisch avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.