There are my routes for a specific controller of my application (I manually create them):
scope: path = & gt; '/ Labor' ,: Controller = & gt; : Labor vote '/' = & gt; : Index =, as in> & gt; 'Labor' post 'start /: task_hour' = & gt; : Start, as: = & gt; 'Start' post 'Stop' = & gt; : Stop, as: = & gt; 'Stop' and I am creating a form_tag, but I am having trouble passing through the posting value. My form is currently:
& lt;% = form_tag start_path%> & Lt;% = select_tag: work_hours, options_for_select (["1", "2", "3", "4", "5", "6", "7", "8"], "1")% & Gt; & Lt;% = submit_tag "# {T 'labor.start_work'}"%> & Lt;% end% & gt; I hope that to work, but unknowingly, it is not and I do not know why I actually get the routing error any way matches {: controller = & Gt; "Labor",: verb => "Start"} Why this is happening and how can I fix this, so that: work_one was posted properly with the form?
You can actually try
& Lt;% = select_tag: work_hours, options_for_select (["1", "2", "3", "4", "5", "6", "7", "8"], "1")% & Gt; & Lt;% = submit_tag "# {T 'labor.start_work'}"%> & Lt;% end% & gt; Then update your data to N controller iwith parameters [: start_labor] [: work_hours] . It worked fine for me
Comments
Post a Comment