I'm new to Ruby on Rails and I've been really enjoying the framework.
I have recently hit a wall that I can't seem to get around. I've
searched to web and haven't found an answer(and my agile development
with rails book hasn't arrived).....
My problem: I have a CSV file that has information about recreation
programs, and the buildings that each program is housed in. It is in
a one line format.
Building name | Location | Program name | Description of program |
Buildings have many programs, but programs only have one building.
I need to import this CSV into a mysql database. I can do this using
migrations and FasterCSV. There are duplicate entries for buildings,
and I only want each building entered into the database once, which I
could use validates uniqueness to ensure.
The wall I've encountered is how do I maintain the relationship
between programs and buildings throughout this import process?
Ie I want to be able to list the programs in each building...
Many Thanks and apologies if there is a very obvious solution that I