skinny_controllers 0.10.3 → 0.10.4

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: bbb96f7788da37f889f320a1f37d8e7ca37ea510
4
- data.tar.gz: 20bf1cb7ecc856907df5a27d8a5f983c04902336
3
+ metadata.gz: 1cb9117a54e18025896a38d10349bbabe938271d
4
+ data.tar.gz: 1f2f384e2f6ec21fa65b2eea166be9c0ee8475ab
5
5
  SHA512:
6
- metadata.gz: f732c190f25ddb33ac707d3dd4f14edbd010f3a53974cb776e02a5abfa153980da9a1f7343050babd72b64baff86503258eddb7d39ecd3d303e19d521d00d9db
7
- data.tar.gz: 43e3c08f3d80b0a4f3ef53b71513514e3084f507c77df1ab7306690ff1beb3f1ba2e670c5bf054092badd94732bdc1125bea4e564b5d894d21c9bc6426afb6ff
6
+ metadata.gz: 67269fd3dc91c95024b8692553d9263f22f2d27b4d71c056fbc30d3287625ebf0ba80ac1e30cba0d41e652c4171edf8633a8af4e21d0486bc66ae0d295aab991
7
+ data.tar.gz: d3e83fff51649f85bb26630c365a67f65f1aeaefc0c71b98bcd80a52f8ebbfe190e6f19f13776b6f5377a3c80de9c9dc92b4e7c40da37a92f75c6e079ee70aad
@@ -51,13 +51,11 @@ module SkinnyControllers
51
51
  lookup = nil,
52
52
  options = {})
53
53
 
54
-
55
-
56
54
  self.authorized_via_parent = false
57
55
  self.current_user = current_user
58
56
  self.action = action || controller_params[:action]
59
- self.params = params_to_hash(controller_params)
60
- self.params_for_action = params_to_hash(params_for_action || controller_params)
57
+ self.params = controller_params
58
+ self.params_for_action = params_for_action || controller_params
61
59
 
62
60
  self._lookup = lookup
63
61
  self.options = options
@@ -65,12 +63,6 @@ module SkinnyControllers
65
63
  self.association_name = options[:association_name]
66
64
  end
67
65
 
68
- def params_to_hash(parameters)
69
- return parameters.to_unsafe_hash if parameters.respond_to?(:to_unsafe_hash)
70
-
71
- parameters.to_h
72
- end
73
-
74
66
  def lookup
75
67
  @lookup ||= begin
76
68
  _lookup || Lookup.from_operation(
@@ -32,7 +32,7 @@ module SkinnyControllers
32
32
 
33
33
  def sanitized_params
34
34
  keys = (model_class.column_names & params.keys)
35
- params.slice(*keys).symbolize_keys
35
+ params.slice(*keys)
36
36
  end
37
37
 
38
38
  # TODO: add a way to use existing strong parameters methods
@@ -43,7 +43,7 @@ module SkinnyControllers
43
43
  unless @model_params
44
44
  model_params = (params_for_action[model_param_name] || params_for_action)
45
45
 
46
- @model_params = model_params == params ? {} : model_params.symbolize_keys
46
+ @model_params = model_params == params ? {} : model_params
47
47
  end
48
48
 
49
49
  @model_params
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module SkinnyControllers
3
- VERSION = '0.10.3'
3
+ VERSION = '0.10.4'
4
4
  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.10.3
4
+ version: 0.10.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - L. Preston Sego III
@@ -238,5 +238,5 @@ rubyforge_project:
238
238
  rubygems_version: 2.6.11
239
239
  signing_key:
240
240
  specification_version: 4
241
- summary: SkinnyControllers-0.10.3
241
+ summary: SkinnyControllers-0.10.4
242
242
  test_files: []