Fixed Deleting Of Maps

This commit is contained in:
2013-01-07 10:48:21 -05:00
parent b9a084cf16
commit 243b33810b
2 changed files with 2 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ class MapsController < ApplicationController
if map != nil
map.destroy
directory = "public/maps"
File.delete("#{RAILS_ROOT}/public/maps/#{params[:map]}")
File.delete("#{Rails.root}/public/maps/#{params[:map]}")
flash.now[:notice] = "Map deleted successfully"
else
flash.now[:error] = "No Map Found"