Re: Renaming routes 3.1.1

Brad,

Yes, I will be dealing with legacy data, but the old system isn't going away. It will still be used for updating records - it's tied to a print process, which is why the data will be modified there. The records will then be curl'd to the RoR app for syndication via an API.

Renaming the routes would allow the process to happen without a lookup.

The attribute names haven't been created yet. But I thought that made sense.

Re: Renaming routes 3.1.1

Still not sure of the basic problem, but it's not that tough to coerce legacy databases to conform to the Rails way.

For example, I deal with legacy data. In Rails the main reference key is assumed to be an integer auto incremented field in the database called 'id' . My legacy database has a table with a primary key that is a text field of a different name, so to make it conform, I have to do this:

So now I have a model Broker, but instead of looking for a database table called 'brokers', it looks for a database table called 'Producer', I've overridden the rails default. Then I tell Rails that the primary key is NOT 'id', but a field called 'ProcuderID'. So for example, when I do:

@broker = Broker.find(params[:id])

It just works, even though params[:id] contains a string and not an integer value.

Am I understanding your dilemma?

Last edited by BradHodges (2011-12-06 01:00:00)

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.