Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

$.ajax how to read data vale in controller in rails

def test
  some_parameter = params[:some_parameter]
  # do something with some_parameter and return the results

  @test=books.find.last
  respond_do |format|
    format.html
    format.json {render json: @test}
  end
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #data #vale #controller #rails
ADD COMMENT
Topic
Name
2+8 =