In rails + jQuery I am trying to make a get request back to the server when an option in the dropdown box is changed. I use the following jquery code:
$("#product_prod_name").change(function(){
$.get("/page/volume_or_quant", "id="+$(this).val(), function(result) {
alert(result)
})
})
now this is giving an error: Missing template pages/volume_or_quant.erb in view path app/views
As you can see...i have no need to create a view. I just want some response back from my action. My action looks like below:
def volume_or_quant
@product = Product.find(params[:id])
@product.volume
end
What is the best thing to do here?