Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8563 (new defect)

Opened 1 year ago

Last modified 1 year ago

[PATCH] ActiveResource tries to create duplicate classes in root namespace

Reported by: foeken Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveResource Version: edge
Severity: normal Keywords:
Cc:

Description

When importing data through activeresource it is to be expected that the data model is similar to your own. In our case:

We import clients, each clients has an address. ActiveResource tries to create the Client object but fails since there is already an Address object in the root namespace that is different. This should be solved by using XML namespace or at least a custumizable namespace.

I created a patch that solves this problem (ugly) by adding an object_prefix to each resource created to ensure uniqueness.

It works but i'd like to see an implementation with modules or some neater form of code.

Attachments

namespace_added_to_active_resource.diff (1.9 kB) - added by foeken on 06/04/07 10:27:15.

Change History

06/04/07 10:27:15 changed by foeken

  • attachment namespace_added_to_active_resource.diff added.

06/19/07 15:35:23 changed by josh

  • summary changed from ActiveResource tries to create duplicate classes in root namespace to [PATCH] ActiveResource tries to create duplicate classes in root namespace.