dynamic_attributes 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/dynamic_attributes.rb +1 -1
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -54,7 +54,7 @@ module DynamicAttributes
54
54
  # Overrides the initializer to take dynamic attributes into account
55
55
  def initialize(attributes = nil)
56
56
  dynamic_attributes = {}
57
- attributes.each{|att,value| dynamic_attributes[att] = value if att.to_s.starts_with?(self.dynamic_attribute_prefix) }
57
+ (attributes ||= {}).each{|att,value| dynamic_attributes[att] = value if att.to_s.starts_with?(self.dynamic_attribute_prefix) }
58
58
  super(attributes.except(*dynamic_attributes.keys))
59
59
  set_dynamic_attributes(dynamic_attributes)
60
60
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Reinier de Lange