Hi,
If I do the following ActiveRecord query
AccountType.find_by_active(true).collect{|at| [at.name,at.id]}
I get the error
undefined method `collect’ for #AccountType:0x459fb10
However if I do
AccountType.find(:all,:conditions=>["active= ? ", true]).collect{|at|
[at.name,at.id]}
then everything is fine.
Why does the find_by_active(true) method work differently from the
longhand version?
Cheers
George