<%= stylesheet_link_tag('easy_calendar') %>
<%= javascript_include_tag('easy_calendar') %>
<script type="text/javascript">
  <%
    # root_url does not work
    base_url = request.url[0 .. -request.path.length]
    base_url = base_url.reverse[base_url.reverse.index("/") + 1 .. -1].reverse
  %>
  window.easyCalendarOptions = {
      'easy_calendar_base_url':'<%= base_url %>',
      'easy_calendar_feed':'<%= easy_calendar_feed_path -%>',
      'easy_calendar_user_availability': '<%= easy_calendar_user_availability_path -%>',
      'easy_calendar_save_availability': '<%= easy_calendar_save_availability_path -%>',
      'easy_calendar_save_calendars' : '<%= easy_calendar_save_calendars_path %>'
  }
</script>
