Monthly Archives: April 2010

>Implement ‘Select column_name from table_name where condition’ in Active Record

>I need an array from the data contained in a particular database column based on a condition, so i get the array of active record rows: array_of_rows = TableName.find(:all, :conditions => {:column_name => [‘col_data1′,’col_data2’]}) Then use the array map! function … Continue reading

Posted in Software Testing | Tagged , , | Leave a comment

Active Record find by Column Name

>In recent days been doing a lot of ruby, which means i tend to use Active Record as well. I had written some scripts where i was selecting records that matched a criteria such as:{|e| e.column_name == 1234} but … Continue reading

Posted in Programming | Tagged , , | Leave a comment