Module: Stone::Resource

Defined in:
lib/sinatra/rest/adapters.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) delete(id)



7
8
9
10
# File 'lib/sinatra/rest/adapters.rb', line 7

def delete(id)
  model = self.find_by_id(id)
  model.destroy if model
end

- (Object) find_by_id(id)



3
4
5
# File 'lib/sinatra/rest/adapters.rb', line 3

def find_by_id(id)
  get(id)
end