- Want to display the events in your Rails app as a calendar?
FullCalendar is a quick and dirty way to do it.
- Want it all bundled up nicely as an asset gem for use with Rails' asset pipeline? fullcalendar-rails is one of the best options.
- Tried to make it look consistent with the rest of your Bootstrap-powered views? Welcome!
Add this gem and its momentjs dependency to your application's Gemfile:
gem 'momentjs-rails' gem 'fullcalendar-bootstrap-rails'
And then execute:
Or install it yourself as:
$ gem install fullcalendar-bootstrap-rails
At this point, the files from the FullCalendar project are in your asset pipeline's path… all you have to do is require them in the appropriate places.
Here is an example:
// app/assets/stylesheets/application.scss @import "bootstrap-sprockets"; @import "bootstrap"; // after the bootstrap dependency @import "fullcalendar";
For more details and options, check the fullcalendar-rails installation section.
A note on versioning
First noticed this type of versioning with @bokmann's fullcalendar-rails:
I am going to version this gem with the version of the FullCalendar code I use, adding an extra digit if I need to release any maintenance versions of the gem itself.
Makes sense to me: It's Semantic Versioning, just that a different semantic. I'm inheriting it, this way you can explicitly require a specific version of FullCalendar, if available:
gem 'fullcalendar-bootstrap-rails', '~> 18.104.22.168'
where the digit after the semantical patch version indicates the release of this gem.
HTTP/1.1 302 Found Location: http://fullcalendar.io/
I mean, not much to say here. You're more interested in how to use FullCalendar.
After checking out the repo, run
bin/setup to install dependencies. Then, run
bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run
bundle exec rake install. To release a new version, update the version number in
version.rb, and then run
bundle exec rake release to create a git tag for the version, push git commits and tags, and push the
.gem file to rubygems.org.
- Fork it ( https://github.com/mariusbutuc/fullcalendar-bootstrap-rails/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create a new Pull Request