Displaying 2 results from an estimated 2 matches for "sayhigh".
Did you mean:
ahigh
2006 Jul 20
3
Newbie question-----Downloading a file and sending it to DB
Hi everyone,
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 imp...
2006 Jul 21
1
Newbie Question about Ruby on rails---cant upload data
...base.
In my app. my user needs to select a file and upload it...however I only
want him to upload certain information from that file. I have written
code to parse only string tables from that file. For example, the table
could look like this:
"hello" = "hello world"
"sayHIgh" = "Saying hello to the world"
To parse it, I have done this in a regular ruby class (and it works!):
class Parser
table = { }
IO.foreach(''Localizable.strings'') { |line|
if line =~ /^ \s* " (.*?) " \s* = \s* " (.*?) "/x
table[ $1 ] = $2...