Permalink
Browse files

Upgrade to the improved property api

  • Loading branch information...
1 parent 29ee22e commit 075b63b252d6aa6924f00fa5b93161d30d48bf63 @solnic solnic committed Sep 12, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/dm-rails/multiparameter_attributes.rb
  2. +2 −2 spec/unit/multiparameter_attributes_spec.rb
View
2 lib/dm-rails/multiparameter_attributes.rb
@@ -110,7 +110,7 @@ def merge_multiparameter_attributes(pairs)
next
end
- klass = properties[name].primitive
+ klass = properties[name].dump_class
begin
attributes[name] =
if klass == Time
View
4 spec/unit/multiparameter_attributes_spec.rb
@@ -108,7 +108,7 @@
and_return(attributes['composite'])
composite_property = mock(::DataMapper::Property)
- composite_property.stub!(:primitive).and_return(::Rails::DataMapper::Models::Composite)
+ composite_property.stub!(:dump_class).and_return(::Rails::DataMapper::Models::Composite)
resource = ::Rails::DataMapper::Models::Fake.new
resource.stub!(:properties).and_return('composite' => composite_property)
@@ -127,7 +127,7 @@
should_receive(:new).with('a string').and_raise(composite_exception)
composite_property = mock(::DataMapper::Property)
- composite_property.stub!(:primitive).and_return(::Rails::DataMapper::Models::Composite)
+ composite_property.stub!(:dump_class).and_return(::Rails::DataMapper::Models::Composite)
resource = ::Rails::DataMapper::Models::Fake.new
resource.stub!(:properties).and_return('composite' => composite_property)

0 comments on commit 075b63b

Please sign in to comment.