This project is archived and is in readonly mode.

#2316 ✓resolved
Jordan Brough

[PATCH] 410 Gone as ResourceGone for ActiveResource

Reported by Jordan Brough | March 23rd, 2009 @ 06:48 PM | in 2.x

Our app needs to distinguish between unknown entities & removed entities. It would be nice if ActiveResource had a ResourceGone error class so that we could do this:


rescue ActiveResource::ResourceGone => e
  ..
end

instead of:


rescue ActiveResource::ClientError => e
  if e.response.code.to_i == 410
    ...
  else
    raise
  end
end

Attached is a patch to do this.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages