active_form_objects 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/handlers/attributes.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3adbc64ad3aaec9bd9588470a8ad973daa6b1549389f52dc24c043b52ec4bea7
|
4
|
+
data.tar.gz: 9fac6d32d71260879886077db2a154cb00cb57793dcbda2cf1683944199c2e9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9193a4a1643092fff0a893fa0f33659be98cfd1b5188919d91ef45f6fbb4a0c4999c95a50ba249ce07c460b00c0816f05501f891ea5ed701ae386200e75cc6
|
7
|
+
data.tar.gz: 11b5bd0d920cac545ddbe4cb202641f0851923329ef7a18ced74e4ae528af8be68245a654ccd6c5be2257476b6e9e263f1f34f2249b5defac09430214f18c118
|
data/lib/handlers/attributes.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'active_support/core_ext/hash/reverse_merge'
|
2
|
+
require 'active_support/core_ext/hash/indifferent_access'
|
2
3
|
require_relative 'base'
|
3
4
|
require_relative 'relations'
|
4
5
|
require_relative 'delegates'
|
@@ -31,7 +32,7 @@ module Handlers
|
|
31
32
|
# DSL method : remap
|
32
33
|
def remap_attributes!
|
33
34
|
(upper(:@@remaped_params) || []).each do |remaped|
|
34
|
-
@params[remaped[:to]] = @raw_params[remaped[:key].to_s]
|
35
|
+
@params[remaped[:to]] = @raw_params[remaped[:key].to_s] if @raw_params.key?(remaped[:key].to_s) && @params[remaped[:to]].blank?
|
35
36
|
end
|
36
37
|
end
|
37
38
|
|