diff options
| author | Alban Peignier | 2017-03-30 10:18:50 +0200 | 
|---|---|---|
| committer | Alban Peignier | 2017-03-30 10:18:50 +0200 | 
| commit | a774d5c5d80effd606b4bc6833ef2fbcb2b064c8 (patch) | |
| tree | 5dcbbf4212b18cd34dc4dbc0f300eb0a4f4357e7 | |
| parent | 912dafa9230bbcf56c76c4540cb9a80e452a2481 (diff) | |
| download | chouette-core-a774d5c5d80effd606b4bc6833ef2fbcb2b064c8.tar.bz2 | |
Ignore invalid date in ActiveAttr. Refs #2997
| -rw-r--r-- | lib/activeattr_ext.rb | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/lib/activeattr_ext.rb b/lib/activeattr_ext.rb index b4c112b72..7803bbecc 100644 --- a/lib/activeattr_ext.rb +++ b/lib/activeattr_ext.rb @@ -28,7 +28,8 @@ module ActiveAttr::MultiParameterAttributes      single_parameter_attributes.merge(        multi_parameter_attributes.inject({}) do |hash, (key, args)|          if args.all?(&:present?) -          hash.merge(key => _attribute_type(key).new(*args)) +          value = _attribute_type(key).new(*args) rescue nil +          hash.merge(key => value)          else            hash          end | 
