rao-resources_controller 0.0.13.pre → 0.0.14.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 374e559ddc58fda50a868d43846d5ebbd0b193e8c2bd573850a4bb112d70ef6f
|
|
4
|
+
data.tar.gz: 3743e7a81b9b37af6dc5f6a5e751eea13282ce56c7ca58b15568f99898e4a5af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 150f368edd989fd1b9000f43295be2f8ec6243cb36457cdbcd8b74b52ec540c355b3abb05cea48a4bbb7cf5c9882fbc69f415fcd652972958f3efa39382cb4cb
|
|
7
|
+
data.tar.gz: 13a761d45f38b8fac1673934c919ac268d17d7fbcc8a495895f7d15d0f391c58fa596bfe292439e2322378f66d1ae0c469d5bfba82a7f3be0f5c9bec3339b89a
|
|
@@ -21,6 +21,8 @@ module Rao
|
|
|
21
21
|
before_filter :initialize_resource, only: [:new]
|
|
22
22
|
before_filter :initialize_resource_for_create, only: [:create]
|
|
23
23
|
end
|
|
24
|
+
|
|
25
|
+
helper_method :resource_namespace
|
|
24
26
|
end
|
|
25
27
|
|
|
26
28
|
class_methods do
|
|
@@ -38,26 +40,26 @@ module Rao
|
|
|
38
40
|
|
|
39
41
|
def update
|
|
40
42
|
if @resource.send(update_method_name, permitted_params) && respond_to?(:after_update_location, true) && after_update_location.present?
|
|
41
|
-
respond_with(
|
|
43
|
+
respond_with(resource_namespace, @resource, location: after_update_location)
|
|
42
44
|
else
|
|
43
|
-
respond_with(
|
|
45
|
+
respond_with(resource_namespace, @resource)
|
|
44
46
|
end
|
|
45
47
|
end
|
|
46
48
|
|
|
47
49
|
def destroy
|
|
48
50
|
@resource.destroy
|
|
49
51
|
if respond_to?(:after_destroy_location, true) && after_destroy_location.present?
|
|
50
|
-
respond_with(
|
|
52
|
+
respond_with(resource_namespace, @resource, location: after_destroy_location)
|
|
51
53
|
else
|
|
52
|
-
respond_with(
|
|
54
|
+
respond_with(resource_namespace, @resource)
|
|
53
55
|
end
|
|
54
56
|
end
|
|
55
57
|
|
|
56
58
|
def create
|
|
57
59
|
if @resource.save && respond_to?(:after_create_location, true) && after_create_location.present?
|
|
58
|
-
respond_with(
|
|
60
|
+
respond_with(resource_namespace, @resource, location: after_create_location)
|
|
59
61
|
else
|
|
60
|
-
respond_with(
|
|
62
|
+
respond_with(resource_namespace, @resource)
|
|
61
63
|
end
|
|
62
64
|
end
|
|
63
65
|
|
|
@@ -67,7 +69,7 @@ module Rao
|
|
|
67
69
|
Rails::VERSION::MAJOR < 4 ? :update_attributes : :update
|
|
68
70
|
end
|
|
69
71
|
|
|
70
|
-
def
|
|
72
|
+
def resource_namespace
|
|
71
73
|
nil
|
|
72
74
|
end
|
|
73
75
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rao-resources_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
|
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
150
150
|
- !ruby/object:Gem::Version
|
|
151
151
|
version: 1.3.1
|
|
152
152
|
requirements: []
|
|
153
|
-
rubygems_version: 3.0.
|
|
153
|
+
rubygems_version: 3.0.3
|
|
154
154
|
signing_key:
|
|
155
155
|
specification_version: 4
|
|
156
156
|
summary: Resources Controllers for Ruby on Rails.
|