Can not search dynamically ! Please help

hi !
i am having problem with , in brief i am trying to search particular
posting by country wise . i have listed all country after clicking on
particular country i want all posted jobs along with this country , i
have this hard code it is searching only for specified country which is
passed ! i want dynamic country searching .

def country_list

 @postjob = Postjob.find(:all, :conditions => ["country ='india'"] )


i can search only posting which are from india ! i want this works
dynamically .

please help !

On 11 Aug 2008, at 11:17, Dharmdip R. wrote:

@postjob = Postjob.find(:all, :conditions => ["country  

=‘india’"] )


You want to have a quick look at rails’ condition handling stuff
(Peak Obsession

In a nutshell assuming a country parameter was being submitted you’d
do something like

@postjobs = PostJob.find :all, :conditions => [“country=?”,
@postjobs = PostJob.find :all, :conditions => {:country=>


till i can not do this stuff !