rectify 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rectify/form.rb +6 -4
- data/lib/rectify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed179d09baec15d8adc4c6bcf6c78bcc4766e71e
|
4
|
+
data.tar.gz: 486c246e99345dee440152d904b37dd004f1600a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1dbacf58c68b37a38c3263f4cd5d0382ca6ac75ba65b9a48194425c19de4763cb1613f600d0e42b03996d621910fcb331c151a566f0fc9e124b2f875187735c
|
7
|
+
data.tar.gz: 8ea6e909cf18ef9fc5a1a2b6476338c75ecde7d73302677a26b0c495db48cb735eeb8dbbc9578698f865b750c5b4eedbb1fc522eb0708de438a830853ce2f9bf
|
data/lib/rectify/form.rb
CHANGED
@@ -10,14 +10,16 @@ module Rectify
|
|
10
10
|
def self.from_params(params, additional_params = {})
|
11
11
|
params_hash = hash_from(params)
|
12
12
|
|
13
|
-
attribute_names = attribute_set.map(&:name)
|
14
|
-
|
15
13
|
attributes_hash = params_hash
|
16
14
|
.fetch(mimicked_model_name, {})
|
17
|
-
.merge(params_hash
|
15
|
+
.merge(params_hash)
|
18
16
|
.merge(additional_params)
|
19
17
|
|
20
|
-
|
18
|
+
formatted_attributes = FormatAttributesHash
|
19
|
+
.new(attribute_set)
|
20
|
+
.format(attributes_hash)
|
21
|
+
|
22
|
+
new(formatted_attributes)
|
21
23
|
end
|
22
24
|
|
23
25
|
def self.from_model(model)
|
data/lib/rectify/version.rb
CHANGED