Reputation: 81
I am building a search form in my rails app using simple_form.
Code in my view
= simple_form_for :principal, url: url_for(action: 'analyze', controller: 'principals', format: :js, dataType: 'script'), method: :get, remote: :true do |f|
= f.input :category_id, input_html: {name: :category_id }
=f.button :submit
Code in analyze.js.erb
alert("check");
In response tab it is showing me alert("check");
but on completion of request it is not showing me alert box.
Upvotes: 1
Views: 527
Reputation: 1089
Looks like errors in analyze.js.erb. You retrieved the js response, but javascript is not valid.
Upvotes: 1