I have to import some csv files into the database. Each file had a corresponding model and table in the system. So I was thinking that there will be some common methods for all the importers (log, spent_time_in_miliseconds, run, ...) and some non common methods (convert_line_to_parameters, ...). Some common methods will end up calling particular methods (i.e. run will call convert_line_to_parameters for each line in the csv file).
I'm new to Ruby so the first idea that I got in mind was using one abstract class and the create one class for each model that has to be imported. Then I realize that didn't look like a Ruby way to solve this problem. My second thought was to create a module with all the common methods and include that module in the different importers, but not sure its the best way either. It will be great to get some ideas from people with more experience to get this done in the best way. Thanks in advance. -- 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.

