I want to pass a variable to a partial, then from the partial through a form to the controller, am I doing that correctly? The variable is called item_id.
The partial form entry + variable:
<%= form_tag contribute_stripe_path, method: :post do %>
...
<%= hidden_field_tag item_id %>
...
The controller
@item_id = params[:item_id]
item = Count.find(@item_id)
...
item.update_attribute(:value, new_value)
Routes
post '/contribute', to: 'counts#stripe', as: 'contribute_stripe'
itemexists. Also I believe this should be:hidden_field_tag 'item_id', item_id