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: 33cb5420fdc28bbd364bb6016c4d6aead5d6a0ae
4
- data.tar.gz: 0e9f8d8868d29ae0dac511c30e82dd9f06120cc7
3
+ metadata.gz: cbe98e662277a07333f4bc103059f2278a375ac8
4
+ data.tar.gz: e8503993238bffc2ff10b37a0a397dbc07c0cb39
5
5
  SHA512:
6
- metadata.gz: 557258742889bd97ad31e7c27db3a04fec56406d0eb08f59341f59c4736ce54e77f6d59bf7676009f5174cb50b984ec4cfbf1704411085efbb3f2ecb9683261c
7
- data.tar.gz: 8986b7e99959fd999bd3a5891e73c78f55b06eb7ab0e3aec53d960d4393eadaec9e3d29de15e7e3e467f62247edd23379f347e6543420817750874f03c04dc22
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 ||= (params_for_action[model_param_name] || params_for_action).symbolize_keys
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
@@ -1,3 +1,3 @@
1
1
  module SkinnyControllers
2
- VERSION = '0.5.7'
2
+ VERSION = '0.5.8'
3
3
  end
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.7
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.7
227
+ summary: SkinnyControllers-0.5.8
228
228
  test_files: []