rao-resource_controller 0.0.13.pre → 0.0.14.pre
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaa818d0535caa44981afbcc3b57da100f07237fe0321b25c1d82b9e4b20e80c
|
4
|
+
data.tar.gz: 6f1b6a55162706ea5be019962f4b34b513fcfe17611d7f33247f3c422f977356
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae880e7cd89c4fbaf43d245b707a920a0d93be07951eb595a038b91b7a61d268afacd4277e737fe9c7c5158f1313f1deeccc53a5f3a8db31c9e4c28737ce99ef
|
7
|
+
data.tar.gz: f6ecb46b66ac735210c43b59db34f3258ce154bcc6cc1d5e1c0cbd06d698d13a6e996b02583fcb8c8d08deb5df73ab6a2deb30b4cf02c99c06488bd9db954fee
|
@@ -18,6 +18,8 @@ module Rao
|
|
18
18
|
before_filter :initialize_resource, only: [:new]
|
19
19
|
before_filter :initialize_resource_for_create, only: [:create]
|
20
20
|
end
|
21
|
+
|
22
|
+
helper_method :resource_namespace
|
21
23
|
end
|
22
24
|
|
23
25
|
def new; end
|
@@ -26,26 +28,26 @@ module Rao
|
|
26
28
|
|
27
29
|
def update
|
28
30
|
if @resource.send(update_method_name, permitted_params) && respond_to?(:after_update_location, true) && after_update_location.present?
|
29
|
-
respond_with(
|
31
|
+
respond_with(resource_namespace, @resource, location: after_update_location)
|
30
32
|
else
|
31
|
-
respond_with(
|
33
|
+
respond_with(resource_namespace, @resource)
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
35
37
|
def destroy
|
36
38
|
@resource.destroy
|
37
39
|
if respond_to?(:after_destroy_location, true) && after_destroy_location.present?
|
38
|
-
respond_with(
|
40
|
+
respond_with(resource_namespace, @resource, location: after_destroy_location)
|
39
41
|
else
|
40
|
-
respond_with(
|
42
|
+
respond_with(resource_namespace, @resource)
|
41
43
|
end
|
42
44
|
end
|
43
45
|
|
44
46
|
def create
|
45
47
|
if @resource.save && respond_to?(:after_create_location, true) && after_create_location.present?
|
46
|
-
respond_with(
|
48
|
+
respond_with(resource_namespace, @resource, location: after_create_location)
|
47
49
|
else
|
48
|
-
respond_with(
|
50
|
+
respond_with(resource_namespace, @resource)
|
49
51
|
end
|
50
52
|
end
|
51
53
|
|
@@ -55,7 +57,7 @@ module Rao
|
|
55
57
|
Rails::VERSION::MAJOR < 4 ? :update_attributes : :update
|
56
58
|
end
|
57
59
|
|
58
|
-
def
|
60
|
+
def resource_namespace
|
59
61
|
nil
|
60
62
|
end
|
61
63
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rao-resource_controller
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rao
|
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: 1.3.1
|
126
126
|
requirements: []
|
127
|
-
rubygems_version: 3.0.
|
127
|
+
rubygems_version: 3.0.3
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Singular Resource Controllers for Ruby on Rails.
|