ror find usage

Issues related to building and deploying Ruby on Rails.
no avatar
sijo
 
Posts: 4
Joined: Fri Jan 11, 2008 3:53 am

ror find usage

by sijo » Fri Jan 11, 2008 3:58 am

Can anybody tell how to use like operator of sql with find in rubyonrails

My problem
@firstname=@search_contact_hash[:name_first]
@search_contact_result=Contact.find(:all,:conditions => ["name_first like '%@firstname%'"])

it is not working.How can I make it working?

no avatar
sijo
 
Posts: 4
Joined: Fri Jan 11, 2008 3:53 am

find

by sijo » Thu Feb 07, 2008 3:50 am

Hi

Thanks for ur reply.Sorry for my very late reply..I used find_where instead of find.A pluggin EZ-where.

Thanks & regards
Sijo

Return to Ruby on Rails