Class: Api::PropertiesController

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

Overview

module Admin

Instance Method Summary collapse

Instance Method Details

#destroyObject



15
16
17
18
19
20
21
22
23
24
# File 'app/controllers/api/properties_controller.rb', line 15

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