Fixed Deleting Of Maps
This commit is contained in:
@@ -39,7 +39,7 @@ class MapsController < ApplicationController
|
|||||||
if map != nil
|
if map != nil
|
||||||
map.destroy
|
map.destroy
|
||||||
directory = "public/maps"
|
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"
|
flash.now[:notice] = "Map deleted successfully"
|
||||||
else
|
else
|
||||||
flash.now[:error] = "No Map Found"
|
flash.now[:error] = "No Map Found"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ if Rails::VERSION::MAJOR >= 3
|
|||||||
match 'exceptionhandler', :to => 'exceptionhandler#index', :via => [:get, :post]
|
match 'exceptionhandler', :to => 'exceptionhandler#index', :via => [:get, :post]
|
||||||
match '/exceptionhandler/maps', :to => 'maps#index', :via => [:get, :post]
|
match '/exceptionhandler/maps', :to => 'maps#index', :via => [:get, :post]
|
||||||
match '/uploadFile', :to => 'maps#uploadFile', :via => :post
|
match '/uploadFile', :to => 'maps#uploadFile', :via => :post
|
||||||
match '/exceptionhandler/maps/delete/:map', :to => 'maps#deleteMap', :via => :post
|
match '/exceptionhandler/delete/:map', :to => 'maps#deleteMap', :via => :post
|
||||||
match '/exceptionhandler/maps/new', :to => 'maps#new', :via => [:get, :post]
|
match '/exceptionhandler/maps/new', :to => 'maps#new', :via => [:get, :post]
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user