 
   title = ajaxify_content.data('page-title')
   flashes = ajaxify_content.data('flashes')
-  content_container = ajaxify_content.data('container') || content_container
-
-  $("##{content_container}").html response.html()
+  container = ajaxify_content.data('container') || content_container
+
+  $("##{container}").html response.html()
 
   # Correct the url after a redirect and when it has the ajaxify param in it.
   # The latter can happen e.g. for pagination links that are auto generated.


active = true
original_content_container = content_container = 'main'
base_paths = null
flash_types = ['notice']
dont_correct_url = false


  $(document).trigger 'ajaxify:content_inserted'

  $("##{container} #ajaxify_content").remove()

  if title
    document.title = title.replace /&amp;/, '&'   # Todo: need to figure out what else needs to be unescaped

  show_flashes(flashes)

  $(document).trigger('ajaxify:content_loaded', [data, status, jqXHR, options.url])

