Hi Below is the parameter for one process Parameters: {"authenticity_token"=>"kpYmwJjjYcJ3PNWBGaBf8rBd1Xxmg1WJjCkDtEYUq+0=", "id"=>"A", "agency"=>{"status"=>"all", "contracts_id"=>"", "state_id"=>"2", "agency_id"=>""}} in some other process Parameters: {"authenticity_token"=>"kpYmwJjjYcJ3PNWBGaBf8rBd1Xxmg1WJjCkDtEYUq+0=", "id"=>"A" } so how can i check "agency" coming or not guide me karthik.k -- Posted via http://www.ruby-forum.com/.
> Parameters: > {"authenticity_token"=>"kpYmwJjjYcJ3PNWBGaBf8rBd1Xxmg1WJjCkDtEYUq+0=", > "id"=>"A" } > > so how can i check "agency" coming or notThis will give you a default value for agency: agency = params[:agency] || {"status"=>"all", "contracts_id"=>"", "state_id"=>"2", "agency_id"=>""} This checks whether ''agency'' exists or not. if params[:agency].nil? ... end -- Posted via http://www.ruby-forum.com/.
Karthik Kantharaj wrote:> Hi > > Below is the parameter for one process > > Parameters: > {"authenticity_token"=>"kpYmwJjjYcJ3PNWBGaBf8rBd1Xxmg1WJjCkDtEYUq+0=", > "id"=>"A", "agency"=>{"status"=>"all", "contracts_id"=>"", > "state_id"=>"2", "agency_id"=>""}} > > in some other process > > Parameters: > {"authenticity_token"=>"kpYmwJjjYcJ3PNWBGaBf8rBd1Xxmg1WJjCkDtEYUq+0=", > "id"=>"A" } > > so how can i check "agency" coming or not > > guide me > > karthik.kHi guys I found my self karthik.k -- Posted via http://www.ruby-forum.com/.