I have a form_for, and I want to access variable of it in corresponding submit controller method. I'll explain what I mean: I have list of objects rendered as follows:
<%= render medical_situations %>
I corresponding medical_situation.html.erb file I specify how each object looks like, where inside of each I have form_for as follows:
<%= form_for medical_situation, {url: :send_to_pool_medical_situations, method: :post, remote:true} do |f| %>
In corresponding controller method I want to access that particular medical_situation object. Is it possible. I know I could pass medical_situation_id to find appropriate object but I am interested can I do it without extra request and code. In my send_to_poo method I want to do update that object.