Closed koppen closed 11 years ago
If I downgrade Active Resource to 3.0.x, making my gem list look like
the problem goes away. I'd have to dig further to figure out exactly what dependency is causing the problem.
Dug a little further: Starting with ActiveResource 3.1.0 the behavior of ActiveResource::Base#persisted?
was changed. The following code behaves differently:
# 3.0.9:
Mite::Tracker.new(:id => 42).persisted? #=> true
# 3.1.0:
Mite::Tracker.new(:id => 42).persisted? #=> false
This then causes the return value of element_path
to change, since it returns nil
when a resource hasn't been persisted. And that causes Mite::Tracker#start
to use the wrong URL.
Hi Jakob,
thx for your detailed description of the issue. I'll look into it during the coming days.
Best, Sebastian.
I'll race ya ;)
I suspect it's a matter of simply fetching the actual TimeEntry from the API instead of only building it locally, but I just haven't taken the time to try it out yet.
Fixed in version v0.5.0
From this version mite-rb only supports activeresource 3.1 and up.
Thanks for reporting! Sebastian
I get the following:
... which isn't quite what I expected.
Digging further it seems it is sending a PUT request to "/tracker/.json", ie without the id of the TimeEntry for whatever reason, which naturally results in a 404.
Running Ruby 1.9.3p194 with a gem list of