softwear-lib 1.3.7 → 1.3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/softwear/lib/api_controller.rb +11 -6
- data/lib/softwear/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8242d03acacefda4174d1a878f58ce9ed135684
|
4
|
+
data.tar.gz: 063cc552f8838513d09f2349ed5f1cd8abb92585
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa25e76ec0d67f5aa99fafe1b6e25b098c2dde96167e2ad54f91cea1b1278ed909d9c8adfd46741519a219020b550c9a0732806490881b4936b5f0fddd0f2ca1
|
7
|
+
data.tar.gz: 6bf34f9428f40692b00cc080687025eea44fe60b92443af472ca8832957042e0342d906d99dcd4812a626005a6381d03caf2bfb9ef3810eabc944d97b8f5c978
|
@@ -56,12 +56,17 @@ module Softwear
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def create
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
59
|
+
self.record = resource_class.new
|
60
|
+
|
61
|
+
permitted_attributes.each do |a|
|
62
|
+
record.send("#{a}=", params[a]) if params[a]
|
63
|
+
end
|
64
|
+
|
65
|
+
if record.save
|
66
|
+
headers['Location'] = resource_url(record.id)
|
67
|
+
respond_to { |format| format.json(&render_json(status: 201)) }
|
68
|
+
else
|
69
|
+
respond_to { |format| format.json(&render_errors) }
|
65
70
|
end
|
66
71
|
end
|
67
72
|
|
data/lib/softwear/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: softwear-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nigel Baillie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|