slim_form_object 2.0.1 → 2.0.2

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: 04280a1e4b59f8a5224e87f366b154f115bda997
4
- data.tar.gz: 8836e2dc9690a4a5cd23e01b8f318e99102f0df8
3
+ metadata.gz: f261198e8a01474d758670be1274e417cf2c6f18
4
+ data.tar.gz: '08d91801892c481b6a528e12dcbaa133fee699e1'
5
5
  SHA512:
6
- metadata.gz: 91ad831f0f9bb4419b678d7562485aabc731727d2453d494e1616994d6213bbffa75ccfb87d925de6508ab4c34be3a3d4c41ab8a9800bbff6699c7d5365545d5
7
- data.tar.gz: 54d9b311c4fbbceba212b2b558b08bef28eb835b1aa1b0f02b6df6fc478f65b1ff7555a709d0d61cc757f9113f72c968b4172da3f27f8bb856374b52c02ed14f
6
+ metadata.gz: 220106f63142c089e0bd5e2f6a3956f3b960be1df09f6830f0bf24d92bc708edf060185b6a44a84fd75979e58add8500b728058509cab582b4b6fb0346dce6e7
7
+ data.tar.gz: bfbfe19f6243685bee2b56a076d554e8443ed222f1f0c19a4b43e6e68eb0db190e2f1c9665984b79ea9423cb194eed397f3d01017f9c4306d42a33753c20ee3f
@@ -77,24 +77,19 @@ module SlimFormObject
77
77
  def assign_objects_attributes(model_name, hash, object_hash, result_array)
78
78
  object = get_class_of_snake_model_name(model_name).new
79
79
  object_hash[:nested] = []
80
+ object_attrs = {}
80
81
  hash.each do |key, val|
81
82
  if is_nested?(val)
82
83
  nested(key, val, object_hash[:nested])
83
84
  else
84
- object.assign_attributes({"#{key}": val})
85
+ object_attrs.merge!({"#{key}": val})
85
86
  end
86
87
  end
88
+ object.assign_attributes(object_attrs)
87
89
  object_hash[:essence] = {model: model_name, object: object}
88
90
  result_array << object_hash
89
91
  end
90
92
 
91
-
92
- # def force_permit(params)
93
- # return nil if params.class != ActionController::Parameters
94
- # params.instance_variable_set(:@permitted, true)
95
- # params
96
- # end
97
-
98
93
  # PARAMS FORMAT
99
94
  # {
100
95
  # "user"=> {
@@ -1,3 +1,3 @@
1
1
  module SlimFormObject
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slim_form_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - woodcrust
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
200
  version: '0'
201
201
  requirements: []
202
202
  rubyforge_project:
203
- rubygems_version: 2.5.1
203
+ rubygems_version: 2.6.12
204
204
  signing_key:
205
205
  specification_version: 4
206
206
  summary: This is form object