app/controllers/maps_controller.rb
#only editors or owners of maps
only editors or owners of maps
only editors or owners of maps
def destroy
    if @map.destroy
      flash[:notice] = "Map deleted!"
    else
      flash[:notice] = "Map wasn't deleted"
    end
    respond_to do |format|
      format.html { redirect_to(maps_url) }
      format.xml  { head :ok }
    end
  end
def destroy if @map . destroy flash [ :notice ] = "Map deleted!" else flash [ :notice ] = "Map wasn't deleted" end respond_to do | format | format . html { redirect_to ( maps_url ) } format . xml { head :ok } end end
only editors or owners of maps
only editors or owners of maps