Hello All,

as far as I remember there was an errors-Method to find out what went wrong
while saving. Apparently this method has gone away (in datamapper-1.0.0),
did the API change? How do I get error information?

Code example below, thanks in advance,
Martin

The following code...

[[[
DataMapper::Model.raise_on_save_failure = true
class TestResource
 include DataMapper::Resource

 property :id, Serial
 property :time, DateTime
end

testResource = TestResource.new
testResource.time = "no time"
begin
 testResource.save
rescue DataMapper::SaveFailureError => e
 puts e.resource.errors.inspect
end
]]]

...fails:
NoMethodError: undefined method `errors' for #<TestResource @id=nil
@time="no time">

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to