[Rails] How can I update a div value using Ajax but calling a function on the OnChange?
Hey guys,
I'm trying to update a div with a result coming from a request to the
database.
So I have created this method on the controller
def retrieve_part_price
@price = Part.find(params[:id])
respond_to do |format|
format.html { redirect_to(items_path)}
format.js { render :nothing => true }
end
end
and added it to the routes properly, but I don't know how should I
call it from my view side to bring the value using Ajax.
any advice? blog post?
Thank you.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home