On 05.02.2012, at 20:23, Sergio Tapia wrote:

> I have a list of items in my shopping page, and each time an "add to
> cart" button is clicked, an AJAX request is fired off with only a
> product_id.
> 
> "Add this item to the cart" so to speak.
> 
> What does my Action have to look like in Rails for this scenario?
> 

  def action_name
    respond_to do |format|
      format.js do
        ...
      end
    end
  end

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to