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'"] )

end


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’"] )

end

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=?”,
params[:country]]
or
@postjobs = PostJob.find :all, :conditions => {:country=>
params[:country]}

Fred

till i can not do this stuff !