I am new to Ruby on Rails.
I get a simple table whose name is Loadtest.
The table have two attributes which are: testname, exectime.
The table may looks like this :
\-------------------------
testname | exectime |
test A | xx-xx-xx |
test B | xx-xx-xx |
\--------------------------
I want to get all the entries under testname, such as ["test A", "test B"]. How could I achieve this?
I could use Loadtest.find(:all) to get all the entries in the table and write some codes to form the testname array. But is there any direct method like Loadtest.column[:testname]?
Thanks for your time!
Yes, there is pluck method.