rails_rad 1.1.2 → 1.1.3
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: 293e3bf2d73229b92a24aef89feafa7690e47753
|
4
|
+
data.tar.gz: dc6d4c717daee55917c93aaa573d748438c974d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cafa13d81185590278aea264c2a3c96c9627e181c74f0f13ed171a3d3380216430e28a95763326964167f7bfae18ea2bddcec9de0e5abed7142f5f4d918dfb43
|
7
|
+
data.tar.gz: f1a7f37496911646907d34ec16e2ca5368757653c65145cc8ea9f22fe7c2215477ed047ac6228cacaa2cfafd3ee98dca39c37bac400d3f44d8c5de351b819687
|
@@ -22,7 +22,7 @@ module Controller
|
|
22
22
|
def create
|
23
23
|
@resource = resource_class.new(permitted_params)
|
24
24
|
@resource.save
|
25
|
-
respond_with @resource, location:
|
25
|
+
respond_with @resource, location: after_create_location
|
26
26
|
end
|
27
27
|
|
28
28
|
def show
|
@@ -38,17 +38,29 @@ module Controller
|
|
38
38
|
def update
|
39
39
|
@resource = load_resource
|
40
40
|
@resource.update_attributes(permitted_params)
|
41
|
-
respond_with @resource, location:
|
41
|
+
respond_with @resource, location: after_update_location
|
42
42
|
end
|
43
43
|
|
44
44
|
def destroy
|
45
45
|
@resource = load_resource
|
46
46
|
@resource.destroy
|
47
|
-
respond_with @resource, location:
|
47
|
+
respond_with @resource, location: after_destroy_location
|
48
48
|
end
|
49
49
|
|
50
50
|
private
|
51
51
|
|
52
|
+
def after_create_location
|
53
|
+
collection_path
|
54
|
+
end
|
55
|
+
|
56
|
+
def after_destroy_location
|
57
|
+
collection_path
|
58
|
+
end
|
59
|
+
|
60
|
+
def after_update_location
|
61
|
+
collection_path
|
62
|
+
end
|
63
|
+
|
52
64
|
def collection_scope
|
53
65
|
resource_class
|
54
66
|
end
|
data/lib/rails_rad/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_rad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
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: 2016-03-
|
11
|
+
date: 2016-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|