skinny_controllers 0.5.7 → 0.5.8
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: cbe98e662277a07333f4bc103059f2278a375ac8
|
|
4
|
+
data.tar.gz: e8503993238bffc2ff10b37a0a397dbc07c0cb39
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cd77b5ee8f879d2afa8d93b6a1a6b4ae48a87cc52744d7d1a6c8f2b330311932a76670ad7683916a868ec32efa147fa8acae6c8cd81fd78e8e6fe5330311541
|
|
7
|
+
data.tar.gz: 652ee2983d0e3c2d367876ee2af006455d27bbfaae62a8b0a54dbc8f6b656edaab114b1e7c13b1d36406c05859e721452dbc01d4153712bafff2335106b5279b
|
|
@@ -54,9 +54,9 @@ module SkinnyControllers
|
|
|
54
54
|
action_params_method = "#{action_name}_#{model_key}_params"
|
|
55
55
|
model_params_method = "#{model_key}_params"
|
|
56
56
|
|
|
57
|
-
if respond_to? action_params_method
|
|
57
|
+
if respond_to? action_params_method, true
|
|
58
58
|
send(action_params_method)
|
|
59
|
-
elsif respond_to? model_params_method
|
|
59
|
+
elsif respond_to? model_params_method, true
|
|
60
60
|
send(model_params_method)
|
|
61
61
|
else
|
|
62
62
|
params
|
|
@@ -28,7 +28,13 @@ module SkinnyControllers
|
|
|
28
28
|
# for mass-assignment, rails doesn't accept
|
|
29
29
|
# stringified keys.
|
|
30
30
|
# TODO: why did the params hash lose its indifferent access
|
|
31
|
-
@model_params
|
|
31
|
+
unless @model_params
|
|
32
|
+
model_params = (params_for_action[model_param_name] || params_for_action)
|
|
33
|
+
|
|
34
|
+
@model_params = (model_params == params) ? {} : model_params.symbolize_keys
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
@model_params
|
|
32
38
|
end
|
|
33
39
|
|
|
34
40
|
def model_param_name
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: skinny_controllers
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- L. Preston Sego III
|
|
@@ -224,5 +224,5 @@ rubyforge_project:
|
|
|
224
224
|
rubygems_version: 2.4.8
|
|
225
225
|
signing_key:
|
|
226
226
|
specification_version: 4
|
|
227
|
-
summary: SkinnyControllers-0.5.
|
|
227
|
+
summary: SkinnyControllers-0.5.8
|
|
228
228
|
test_files: []
|