Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Grant,
- Having an issue linking this all together... for this nested time update button..
- I want the button to update the call_responding which is inherited through the CallsController, the nested resource that the form pulls
- from is Calls::Respondings..
- in my CallsController show action I have this
- def show
- @call = Call.find(params[:id])
- ## Responding Nested
- @respondings = @call.respondings
- ## Ping Nested
- @pings = @call.pings
- ## Agency Nested
- @agencies = @call.agencies
- ## Incidents Nested
- @incidents = @call.incidents
- ## Complainants Nested
- @complainants = @call.complainants
- end
- My Custon Controller Action is as follows:
- def unit_responding_update
- @responding = Responding.find(params[:id])
- @responding.responding_tme = DateTime.now
- @responding.responding = "true"
- @responding.on_scene = "false"
- @responding.clear = "false"
- end
- My end goal is to have that button push the data to the table.. using a link similar to:
- <%= link_to "Responding", unit_responding_update_call_responding_path, method: :patch %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement