Skip to content

Instantly share code, notes, and snippets.

@sushant12
Created June 2, 2017 09:10
Show Gist options
  • Save sushant12/ac675c7cb2c5ece815423b6b3cde608a to your computer and use it in GitHub Desktop.
Save sushant12/ac675c7cb2c5ece815423b6b3cde608a to your computer and use it in GitHub Desktop.
deleting the task
elsif(env[‘PATH_INFO’] ==’/delete’)
req = Rack::Request.new(env) id = req.params[“id”] DB.execute(“delete from tasks where rowid=’#{id}’”)
return [ 302, {‘Location’ =>”/”}, [] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment