hi there,

i am not a expert with ruby at all. this is my first post, i do hope
it's at right place, please advise otherwise.

i have some dump reporting to do. The input is a csv file. i figured
rupert could be my friend.

i got it up and running with the following

# instanciate the csv reading stuff
t = Table("source.csv")

# remove unnecessary junk
t.remove_column("Product/Release Xdor")

now i want to filter and search data like

Student.find(:all, :conditions => { :first_name => "Harvey", :status =>
1 })

(example taken from
http://api.rubyonrails.org/classes/ActiveRecord/Base.html)

however, the trick is that some of the column names have both the '/'
character and white spaces in them.

so it would look like

t.find(:all, :conditions => { :Product/White Darf => "Harvey",
:Solution/Small Story => 0 })

=> that is giving me syntax errors.


t.find(:all, :conditions => { :'Product/White Darf' => "Harvey",
:'Solution/Small Story' => 0 })

=> this is throwing instead

$ ruby ruport.rb Anovo-Biometrics-cases.csv
ruport.rb:86:in `find': wrong number of arguments (2 for 1)
(ArgumentError)
        from ruport.rb:86:in `run'
        from ruport.rb:115

I feel confused. it seriously look like i've fallen into some beginners
issue.

anyone has an idea ?

thanks
-- 
Posted via http://www.ruby-forum.com/.