String concatenation with symbol

I’m trying to make this work:
@targets = Targets.find(:all, :conditions => 'description LIKE :id ')
I know it can’t work having the :id in there just like that but I
can’t find a way to embed that in there. Thanks in advance guys!

fede wrote:

I’m trying to make this work:
@targets = Targets.find(:all, :conditions => 'description LIKE :id ')
I know it can’t work having the :id in there just like that but I
can’t find a way to embed that in there. Thanks in advance guys!

I am not sure exactly what you are trying to accomplish, but maybe this
form of #find will help you out:

@targets = Targest.find(:all, :conditions => [‘description LIKE ?’,
whatever])

David B. Williams
http://www.cybersprocket.com