hi shailey, just to add to thorsten's note: the uploaded file is passed as a UploadedStringIO to your controller. It's not saved anywhere, so there isn't a full path. You can save it yourself if you want, so it's up to you to choose the path. Or like thorsten suggests directly parse it and save its contents in the database in any structure you like.
dirk. On Sep 8, 10:41 am, Thorsten Müller <[EMAIL PROTECTED]> wrote: > you don't need that to parse the csv file. > > something like this (in Model) will do: > > attr_accessor :invitations_csv_file > > def upload_invitations > if invitations_csv_file && invitations_csv_file != "" then > CSV::Reader.parse(invitations_csv_file.read) do |parsed| > # do something here with the parsed content (fields in > parsed[0], parsed[1]...) > end > end > end > > In controller: > > @edition.invitations_csv_file = params[:file] > @edition.upload_invitations --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

