How to structure Rails link so that clicking it will update an ActiveRecord attribute -
I have two models, a property model and an app model. There are many properties in the application, and the property is an application_id in the property model, such as the application_id, which indicates the application associated with the property. I want to show a list of all the potential applications on the property show page, a link to the application which, if clicked, will update the application_id just in the property model in the ID of that application. Here is my relevant code: view / properties /show.html.erb select an application template : & Lt; Ol class = "microposts" & gt; & Lt;% @ owner.application.each do | Template | & Gt%; & Lt; Li & gt; & Lt;% = link_to "Application # {template.id}" ,: admin = & gt; "Attribute",: verb = & gt; "Update" ,: Method = & gt; : Put, application_id = & gt; Template.id% & gt; & Lt; / Li & gt; & Lt;% end% & gt; & Lt; / O...