 
     nearest
 
-  savedSettings: ->
+  loadSettings: ->
     settings = JSON.parse(window.localStorage.getItem(@storageKey) || '{}')
 
     # currentDate setting expires after one hour

    window.location.href = "#{@newUrl}&#{$.param(@selection)}"

  initialViewType: (linkParam, defaultType) ->
    type = @forceDay() && 'day' || linkParam || @savedSettings().viewType || defaultType || 'week'
    @URL_PARAMS_TO_VIEW_TYPES[type]

  permalink: ->

    @ruleSet = options.ruleSet
    @resourceId = options.resourceId
    @storageKey = "calendar#{@resourceId}Settings"
    @savedSettings = @loadSettings()

    @calendar.fullCalendar
      events: options.feedUrl
      defaultView: @initialViewType(options.viewType, options.defaultViewType)
      defaultDate: options.focusDate || @savedSettings.currentDate
      height: 700
      allDaySlot: false
      eventOverlap: false
