simple_record 1.1.47 → 1.1.48

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.
data/lib/simple_record.rb CHANGED
@@ -420,8 +420,8 @@ module SimpleRecord
420
420
  ret = super(atts)
421
421
  # puts '@atts=' + @attributes.inspect
422
422
  atts.each_pair do |k, v|
423
+ @attributes[k.to_s] = v
423
424
  if k.is_a?(Symbol)
424
- @attributes[k.to_s] = v
425
425
  @attributes.delete(k)
426
426
  end
427
427
  end
@@ -458,9 +458,11 @@ class TestSimpleRecord < TestBase
458
458
  mm = MyModel.new({:name=>"myname"})
459
459
  mm.save
460
460
 
461
- mm.update_attributes(:name=>"name2", :age=>21)
461
+ now = Time.now
462
+ mm.update_attributes(:name=>"name2", :age=>21, "date2"=>now)
462
463
  assert mm.name == "name2", "Name is #{mm.name}"
463
464
  assert mm.age == 21
465
+ assert mm.date2 == now
464
466
  end
465
467
 
466
468
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.47
4
+ version: 1.1.48
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Reeder