0
I am trying to call via ajax a function in a text_field field, I tried it in two ways: 1 - From Undefined method remote_function error.
<%= f.text_field(:data, class: "form-control", :remote => true, :onchange=>remote_function(:url=>{:action=>"fetch_duration"})) %>
2 - From Synthase error
<%= f.text_field(:data, class: "form-control", :remote => true, :onchange=> {:url=>{:action=>"fetch_duration"}}) %>
Does anyone have any example, or link that can help me?