I'm having a problem accessing the :prepend_id variable in my shared/_time_select.html.erb. The variable seems to be empty. The idea is to be able to call the partial and pass in a string (to prepend the id's) so there aren't conflicts with the post variables when there are 2 or more time input fields on the page.
I am calling the following line from another _form.html.erb partial.
<%= render 'shared/time_select', :locals => { :prepend_id => "starttime" } %>
Here is a piece of my shared/_time_select.html.erb
<div id="<%= @prepend_id.to_s %>_select_container time_select_container">
<select name="<%= @prepend_id %>_hour">
...
</select> :
<select name="<%= @prepend_id %>_minute">
...
</select>
<select name="<%= @prepend_id %>_ampm">
... </select>
</div>
That will make posting them to the controller a lot easier. Then in the controller I could easily append the times to the datetime that is being submitted in the same form. Also, a side question is I'm wondering if this would be a good time to use a helper or not?