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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f6181adcb3d172b124dceba665cae5c8d99a3a7
|
4
|
+
data.tar.gz: cb5e02188b48fdbd21610bed1fe900b3b1ba5bb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|