sinatra-backstage 0.2.5.1 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0677879977eb93c118d1b6d86b2e8df4e1ae9fb4
4
- data.tar.gz: df94b6147f9d823e6df36a61b72cfa8f6c1377b2
3
+ metadata.gz: 3f6181adcb3d172b124dceba665cae5c8d99a3a7
4
+ data.tar.gz: cb5e02188b48fdbd21610bed1fe900b3b1ba5bb2
5
5
  SHA512:
6
- metadata.gz: e38d0bbfdad1494e7686a5cda9f9907554f5462203f55e9cab49e9c3d05f10459f771917e5829355108cac314d1bb2e01984c3d5004aaf45e0ebe5d02b0179a4
7
- data.tar.gz: cb1f266ed2577228a74e0c74da23ebfd06f551ae2f55e1faee53bb7ff9b9d7300dbfb60a0e0e24c302f91160e466b1dc33ca8eb2671b003c0d005b53c24ac914
6
+ metadata.gz: da09eedd9134b50a83f216c9461aca84659110738d1127fe3f29baa740083206826d8679cce7e2d7270ddbf7f762994c4654abda182dacca39abf2e821d2766b
7
+ data.tar.gz: 19dab607897fd7a9471e7f4dda372405e868ad23c01360d76c9469b1a040550b39238a9cc16339a3aeccfe2fae50b4ed4014d3f6300397fd10582ee2226ba81f
@@ -54,6 +54,13 @@ module Sinatra
54
54
  end
55
55
  end
56
56
 
57
+ ## Destroy file object
58
+ delete "#{namespace}/:id/#{field_name}" do |id|
59
+ child_obj = klass.get!(id).send(field_name)
60
+ child_obj.destroy unless child_obj.nil?
61
+ redirect "#{namespace}/#{id}"
62
+ end
63
+
57
64
  end
58
65
 
59
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-backstage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5.1
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Popov