Project

cal_months

0.0
No commit activity in last 3 years
No release in over 3 years
A nice extension for quickly incorporating icalendar imports with default views (Rails 3)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.2
 Project Readme

Rails 3

Cal Months

Allows for importing ical format calendars to the database with some default calendar views.

Installing

Install the gem: gem cal_months

Install the required files in your rails app: $ rails g cal_months:install

Run migrations: $ rake db:migrate

Manually installing assets

Stylesheet: // require cal_month

Javascript: //= require cal_month

Add Default Calendar Partial to a View

Add this to your view: render 'cal_months/calendar'

Add this to your controller:

@cal_month = CalMonth.current_month
@current_event = CalMonth.upcoming_events.first

Note: @cal_month can be any CalMonth, and @current_event can be any item in the CalMonth.upcoming_events array.

Importing icalendar

ical = File.open('path_to_ical.ics', 'r')
CalEvent.import_from_ical(ical)