showing results for - " 24 ajax how to read data vale in controller in rails"
Camilla
14 Mar 2020
1def test
2  some_parameter = params[:some_parameter]
3  # do something with some_parameter and return the results
4
5  @test=books.find.last
6  respond_do |format|
7    format.html
8    format.json {render json: @test}
9  end
10end
Adriana
02 Jun 2018
1$.ajax({
2  type:"GET",
3  url:"books/test",
4  dataType:"json",
5  data: {some_parameter: 'hello'},
6  success:function(result){
7    alert(result);
8  }
9})
queries leading to this page
rails get index with ajax index js not workingrails js ajaxrails 5 2 jquery on success reloadindex ajax railsrails server javascript xhr requestrails ajax fetch data from controllerruby on rails ajax exempleajax get request railsrecive data from ajax in railssending a data in ajax response in rails ajax in ruby on railsruby ajax preservate state search urlhow to use ajax in ruby formafter ajax call how to call api index method railsrails post jquery ajaxmake ajax calls in rubyget ajax request railshow to do ajax call in railssend ajax request to display alert railsrails ajaxpass ajax data to rails partialajax ruby on railshow to respond with data for ajax request in railsrails 5 2 form submitt by ajaxajax post call in rails to save data example 24 ajax how to read data vale in controller in railsrails 5 2 ajax buttonhow to send the data to view in rails using ajaxrails ajax call typesmake ajax call in railspass ajax data to controller railsrails ajax rendering response instead of returningajax use with rails 24 ajax railsajax for railsrails ajax get requestsample ajax in railsi have ajax link on my rails i need when i ckick on it do display it instead of a part of the pagerecord not upadating througj ajax railsajax request railsrails load javascript page and ajax callrails ajax call to controller method loading ruby on rails ajaxajax in railsedit rails jquery ajax getrails ajax call to controller methodajax data to rails controllerajax javascript railsadd ajax request in controller railsruby on rails ajax examplewhen i updating the div with ajax javascript events are not able to call in railsajax response to railsrails ajax get data from controller rails ajax request controllermake get request with ajax and railsajax render in a new page 2b railsrails load view ajaxrails ajax call to render htmlajax call in railsrails ajaxhow to make ajax call in railshow to respond wit data for jax request in railsjavascript and ajax with rails 24 ajax how to read data vale in controller in rails