views:

29

answers:

1

In Rails, I have a question on how to get the multiple params ! for example: the string in log like this

 Processing ConfigurationsController#emergency_config (for 192.168.1.124 at 2010-05-31 11:45:53) [POST]
  Parameters: {"authenticity_token"=>"I3GPKyrjmDRLkMIxFVS/47mgEI4ETO/+YW+R8R5Q2GM=", "tid"=>"1", "emergency"=>{"department"=>["1", "2", "3", "4", "5", "6", "7", "8"]}}

so,how can i get the department values from it? who can tell me the answer? thank you!

+1  A: 

Is this a trick question?

params[:emergency][:department]
Eimantas
Thank you for your help!
Small Wolf
When someone answers your question for you, please be courteous enough to give a +1 and a checkmark. And to address the root of your question, look up "Ruby Hash". 'params' in this case is just a hash-of-hashes, and pretty easy to navigate once you know what's going on.
jdl