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 +4 -4
- data/lib/slim_form_object/assign.rb +3 -8
- data/lib/slim_form_object/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f261198e8a01474d758670be1274e417cf2c6f18
|
4
|
+
data.tar.gz: '08d91801892c481b6a528e12dcbaa133fee699e1'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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"=> {
|
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.
|
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.
|
203
|
+
rubygems_version: 2.6.12
|
204
204
|
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: This is form object
|