Class: Api::CountriesController

Inherits:
BaseController
  • Object
show all
Defined in:
app/controllers/api/countries_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



4
5
6
7
8
9
10
11
12
13
# File 'app/controllers/api/countries_controller.rb', line 4

def destroy
   puts "&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&"
    puts params[object_name]
     puts params[:id]
    @object=Country.find_by_id(params[:id])
     @object.destroy
    if @object.destroy
    render :text => 'Destroyed' 
  end
end