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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/handlers/attributes.rb +2 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 126da84d089de0420d5365580fe87b46913fb16a0123dab3c0c17f178996df76
4
- data.tar.gz: e4c1c195cfb94aea99f0b9eae4beecb2629a89f00bc4a688a78201847512be84
3
+ metadata.gz: 3adbc64ad3aaec9bd9588470a8ad973daa6b1549389f52dc24c043b52ec4bea7
4
+ data.tar.gz: 9fac6d32d71260879886077db2a154cb00cb57793dcbda2cf1683944199c2e9d
5
5
  SHA512:
6
- metadata.gz: 6d2beadaf88fb9600e95bc5068f81b5c638a57bb977a7d0a04329819f421d90d0c3badc8b899cab8a9c77b45212af564ce863a7d28b45144bcde60c6304f7760
7
- data.tar.gz: e86dbc316cf39905f6314c117a28d78479207162f6135c812817c771492edc425c3e5d9ca45234e879ae709ef48fc0305ea6a9d2ee752b93572d83bd4c21eeb4
6
+ metadata.gz: dc9193a4a1643092fff0a893fa0f33659be98cfd1b5188919d91ef45f6fbb4a0c4999c95a50ba249ce07c460b00c0816f05501f891ea5ed701ae386200e75cc6
7
+ data.tar.gz: 11b5bd0d920cac545ddbe4cb202641f0851923329ef7a18ced74e4ae528af8be68245a654ccd6c5be2257476b6e9e263f1f34f2249b5defac09430214f18c118
@@ -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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_form_objects
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michaël Villeneuve