I’m new with RoR and I’m working on a project that uploads information
(keys-values) from a file into a database. Here is the situation:
Somewhere in this file there is a strin-table such as the following:
“hello” = “hello world”
“sayHIgh” = “Saying hello to the world”
I have parsed the files with a ruby script in such a way so that when I
enter a key, I get a value (sort of like a hash). Ex: if I enter the
string “hello” I get the value “hello world”.
My problem is the following:
I want import these Key-Value into my database. The keys will go under
the key column and the value will go under the value column. I’m not
sure what to do from here.
So far I know how to collect key-values from the incoming file, I have a
view that asks user for the file (a browse button).
Does anybody have any ideas on how I can aproach this?
Thank you all for your input