Skip to content

Commit

Permalink
Add events.js to fetch events into calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
scaffeinate committed Apr 28, 2017
1 parent 5836738 commit d5885ab
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion app/assets/javascripts/events.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
// All this logic will automatically be available in application.js.
$(document).ready(function () {
var friends_calendar = $('#calendar').fullCalendar({
defaultView: 'month',
events: {
url: '/events/calendar',
type: 'GET',
error: function () {
alert('There was an error while fetching events.');
}
}
});
});

0 comments on commit d5885ab

Please sign in to comment.