Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A simple calendar gem for Rails 3.2
Ruby
Tag: v0.0.1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
.gitignore
Gemfile
README.md
Rakefile
simple_calendar.gemspec

README.md

Simple Calendar

This is a small gem for creating a quick and clean table calendar. Theming is up to you, but it works nicely with Twitter Bootstrap.

Installation

Just add this into your Gemfile followed by a bundle install:

gem "simple_calendar", "~> 0.0.1"

Usage

Here we have a model called Event with the start_time attribute that we will be using with simple_calendar.

class Event < ActiveRecord::Base
  has_calendar
end

We query the events we want to display as usual, and then render the calendar in the view like so:

<%= calendar @events %>

has_calendar has options that can be passed to it for configuration:

has_calendar :title => :whatever, :start_time => :my_start_column

def whatever
  title + " ohai"
end

Start_time is the field for the start time of the event. Title is the text that will be displayed for the event on the calendar.

Something went wrong with that request. Please try again.