Class: Api::StatesController

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

Instance Method Summary collapse

Instance Method Details

#destroyObject



9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/api/states_controller.rb', line 9

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