[Rails] can''t convert Fixnum into String ??

Alder Green
Thu, 01 Jun 2006 10:22:17 -0000

The problem is your attempt to add a number to a string. When adding
foo + bar, if foo is a string, bar should be a string too. The
simplest solution would be to convert @purchaseorder.project_id to a
string with @purchaseorder.project_id.to_s.

A better solution imho would be to embed @purchaseorder.project_id in
a string, like this:

... :conditions => "id = #@purchaseorder.project_id"

--
-Alder