I'm trying to call via ajax a function in a textfield field, I've tried two ways: 1 - From the undefined method remote_function error.
<%= f.text_field(:data, class: "form-control", :remote => true, :onchange=>remote_function(:url=>{:action=>"fetch_duration"})) %>
2 - From the Synapse error
<%= f.text_field(:data, class: "form-control", :remote => true, :onchange=> {:url=>{:action=>"fetch_duration"}}) %>
Does anyone have an example, or link that can help me?