search for: find_by_partnam

Displaying 1 result from an estimated 1 matches for "find_by_partnam".

Did you mean: find_by_partname
2005 Dec 14
4
find_by_ issue
..._ and find_all_by_ and fill in the last piece with a valid column name. So I have a database table called "parts" and the following columns: id partname partnumber vendor I do the following: (connection to DB already established) class Part < ActiveRecord::Base end mypart = Part.find_by_partname("Large Widget") if mypart != nil for rs in mypart p rs.partname end end According to how I understand the book, I can use find_by_ and set it to find_by_partname, however this fails with the error: `method_missing'': undefined method So looking at the RoR API I cannot eve...