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
-~----------~----~----~----~------~----~------~--~---