I am using import CSV to import from a csv file to my database in my
rails app. I want to be able to be able to add a list of email
addresses from this file but also include the mailinglist_id which is
a param[:id] on my page in the database entry. So in effect adding a
csv of emails to any mailing list.
I am just a little unclear as to how I add the extra field when adding
the data to the database.... any help would be great!!
I am using import CSV to import from a csv file to my database
in my rails app. I want to be able to be able to add a list of email
addresses from this file but also include the mailinglist_id which is
a param[:id] on my page in the database entry. So in effect adding
a csv of emails to any mailing list.
I am just a little unclear as to how I add the extra field when adding
the data to the database.... any help would be great!!
The easiest way might be to add a hidden field to your form to pass the
controller the mailinglist_id. I've added a little code below (untested)
that might do the trick.