[英]catching the value of a time_select in rails
I have a form that has two field (time_selects), the idea is that the user can select the beginning of a call and end time of the call. 我有一个具有两个字段(time_selects)的表单,其思想是用户可以选择呼叫的开始和呼叫的结束时间。
I've setup a observe field and works fine: 我已经设置了一个观察字段,并且工作正常:
<%= observe_field "llamada_inicio_4i", :update => "total", :with => "llamada_inicio_4i",
:url => { :controller => "llamadas", :action => "time_tracker"}%>
Sends the value out: 发送值:
Processing LlamadasController#time_tracker (for 127.0.0.1 at 2010-04-22 17:48:41) [POST] Parameters:"llamada_inicio_4i"=>"23",authenticity_token"=>"+D+yPSVue6yQNfPMuVLkrJn7B9tP6z5S1icKpPFTiso="} Rendering template within layouts/llamadas Rendering llamadas/time_tracker Completed in 5ms (View: 3, DB: 0) | 200 OK [http://0.0.0.0/llamadas /time_tracker]
How can i catch this value Parameters:"llamada_inicio_4i"=>"23" 如何捕获该值参数:“ llamada_inicio_4i” =>“ 23”
params[:llamada_inicio_4i] 参数[:llamada_inicio_4i]
in your controller 在您的控制器中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.