 @remove_neuron_type = (my_id) ->
   rnt = (doc) ->
     index = doc.neuron_types.indexOf(@my_id)
-    
+
     # No need to check for index==-1 because we know it does not (except race condition).
     doc.neuron_types.splice index, 1
     @coll.update doc._id,

    field_name: field_name

  doc = BinaryData.findOne(my_id)
  
  S3.delete doc.relative_url
  BinaryData.remove my_id
  return

Router.route "/driver_lines/:_id/:name?",
  name: "driver_line_show"
  action: ->
    using_canonical_name=false
    doc = DriverLines.findOne _id: @params._id
    if @params.name?
      if doc? and @params.name == doc.name
        using_canonical_name = true

    if doc?
      if using_canonical_name
        @render "driver_line_show"
      else
        @redirect( "driver_line_show", {_id:@params._id,name:doc.name} )
    else
      # The _id is not in the database. Should maybe do a 404. For
      # now, render with blank data.
      # FIXME in the future (See
      # https://github.com/EventedMind/iron-router/issues/237 )
      @render "PageNotFound"

  data: ->
    DriverLines.findOne _id: @params._id

