Skip to content
This repository
Browse code

Upgrade to the improved property api

  • Loading branch information...
commit 075b63b252d6aa6924f00fa5b93161d30d48bf63 1 parent 29ee22e
Piotr Solnica solnic authored
2  lib/dm-rails/multiparameter_attributes.rb
@@ -110,7 +110,7 @@ def merge_multiparameter_attributes(pairs)
110 110 next
111 111 end
112 112
113   - klass = properties[name].primitive
  113 + klass = properties[name].dump_class
114 114 begin
115 115 attributes[name] =
116 116 if klass == Time
4 spec/unit/multiparameter_attributes_spec.rb
@@ -108,7 +108,7 @@
108 108 and_return(attributes['composite'])
109 109
110 110 composite_property = mock(::DataMapper::Property)
111   - composite_property.stub!(:primitive).and_return(::Rails::DataMapper::Models::Composite)
  111 + composite_property.stub!(:dump_class).and_return(::Rails::DataMapper::Models::Composite)
112 112
113 113 resource = ::Rails::DataMapper::Models::Fake.new
114 114 resource.stub!(:properties).and_return('composite' => composite_property)
@@ -127,7 +127,7 @@
127 127 should_receive(:new).with('a string').and_raise(composite_exception)
128 128
129 129 composite_property = mock(::DataMapper::Property)
130   - composite_property.stub!(:primitive).and_return(::Rails::DataMapper::Models::Composite)
  130 + composite_property.stub!(:dump_class).and_return(::Rails::DataMapper::Models::Composite)
131 131
132 132 resource = ::Rails::DataMapper::Models::Fake.new
133 133 resource.stub!(:properties).and_return('composite' => composite_property)

0 comments on commit 075b63b

Please sign in to comment.
Something went wrong with that request. Please try again.