rails_rad 1.1.3 → 1.1.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 675454eb7bd66481ef5dd7f8a38670175912a4ea
|
4
|
+
data.tar.gz: 4bdfc893610a2402c38fe7c7447c68b4957f9c01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac07806acb94995c158065bc5d43d60ea17afc3802fa5516a1e73ba32f254ae08899907458b681c84edb61a9390394883531444fbdac1eb181a92697b974c7a9
|
7
|
+
data.tar.gz: 065b14e7078fa39bfae71ecd575fb5d41303e37c06e26a50c7e0e2a9e91b9039abbc7408d102f4f14007f16b332e9f03bd8481cd1b1c9e469788541425b7c057
|
@@ -15,12 +15,12 @@ module Controller
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def new
|
18
|
-
@resource =
|
18
|
+
@resource = initialize_scope.new(permitted_params_for_new)
|
19
19
|
respond_with @resource
|
20
20
|
end
|
21
21
|
|
22
22
|
def create
|
23
|
-
@resource =
|
23
|
+
@resource = initialize_scope.new(permitted_params)
|
24
24
|
@resource.save
|
25
25
|
respond_with @resource, location: after_create_location
|
26
26
|
end
|
@@ -49,8 +49,16 @@ module Controller
|
|
49
49
|
|
50
50
|
private
|
51
51
|
|
52
|
+
def permitted_params_for_new
|
53
|
+
params.has_key?(resource_class.name.demodulize.underscore.to_sym) ? permitted_params : {}
|
54
|
+
end
|
55
|
+
|
56
|
+
def base_scope
|
57
|
+
resource_class
|
58
|
+
end
|
59
|
+
|
52
60
|
def after_create_location
|
53
|
-
collection_path
|
61
|
+
@resource # collection_path
|
54
62
|
end
|
55
63
|
|
56
64
|
def after_destroy_location
|
@@ -58,15 +66,19 @@ module Controller
|
|
58
66
|
end
|
59
67
|
|
60
68
|
def after_update_location
|
61
|
-
collection_path
|
69
|
+
@resource # collection_path
|
62
70
|
end
|
63
71
|
|
64
72
|
def collection_scope
|
65
|
-
|
73
|
+
base_scope
|
74
|
+
end
|
75
|
+
|
76
|
+
def initialize_scope
|
77
|
+
base_scope
|
66
78
|
end
|
67
79
|
|
68
80
|
def initialize_resource
|
69
|
-
|
81
|
+
initialize_scope.new
|
70
82
|
end
|
71
83
|
|
72
84
|
def load_collection
|
@@ -74,7 +86,7 @@ module Controller
|
|
74
86
|
end
|
75
87
|
|
76
88
|
def load_scope
|
77
|
-
|
89
|
+
base_scope
|
78
90
|
end
|
79
91
|
|
80
92
|
def load_resource
|
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.4
|
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:
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -108,9 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
version: '0'
|
109
109
|
requirements: []
|
110
110
|
rubyforge_project:
|
111
|
-
rubygems_version: 2.
|
111
|
+
rubygems_version: 2.6.11
|
112
112
|
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Rails Rapid Application Development Tools
|
115
115
|
test_files: []
|
116
|
-
has_rdoc:
|