Monday, April 23, 2012

[Rails] using Ajax for link_to

Hello, it is my first question
....
I have some problem with implementation java script in my project
I have a lot of carts and a have a link add_quantity
and I need to increase the quantity on 25 each time

I made it without ajax but I need to use it....

I know that update method not correct...Is somebody has idea?
thanks

<td><%= link_to_remote 'add quantity', :url =>
add_quantity_cart_path(id: cart) , update: => cart.quantity(id: cart)
%></td>

--
Posted via http://www.ruby-forum.com/.

--
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


Real Estate