I've got a working app, at its core I have a rake task that pulls in the resort data from a CSV file (which a data provider will give me annually). Thanks to the help here it's all working fine. I think I've made a basic error in the architecture of the app though and I'd like to put it right at this early stage.
In short my data providers CSV file contains a serial_number field which looks like this "574338". You can see my existing app records it in a serial_number field of the Resort. I have adverts too such with HABTM on resorts <-> adverts, as I say it's al working as it but I think that what I need to do here is alter the join table so that it links adverts to resorts on serial_number and not on the resort ID. My concern here is that I want to be using the same key field for resorts as my data provider and that's the serial_number. So - how do I do it? I made several attempts, but it all gets quite confusing, quite quickly. I'd be very grateful for help, a lot of code with line numbers pasted here. I'm guessing that the secret sauce is in lines, 5, 90, 196 and 197 (unsure if I have to touch the resort or advert migrations). I've pastied the routes file as well for good measure. http://pastie.org/581103 Be grateful for help here :-). bb -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

