link-to-remote

How to get link_to_remote work with jQuery? Ajax is not defined error

I'm using Ruby on Rails with jQuery and trying to do the following: <%= link_to_remote (image_tag("delete.png"), :url => { :action => 'remove_candidate', :id => candidate }) %> When I load a page and hit the link I get 'Ajax is not defined' error in FireBug console. I understand that it's because I didn't load prototype, but load...

Rails link_to_remote rendering nothing, why?

RoR newbie here. Working the "play time" exercises at the end of Agile Web Dev with Rails, chapter 9. Can't get link_to_remote to generate a link for me in a partial. My store_cart_item.html.erb partial looks like this: <% if cart_item == @current_item then %> <tr id="current_item"> <% else %> <tr> <% end %> <td> <!-- stuck her...

How do I update a :has_one value through link_to_remote?

I want to be able to change value for the :status_contact for the model Contact (has_one :status_contact Here is the snippet with the link_to_remote: <%= link_to_remote "Responded - Positive", :url => contacts_url(@contact, :status => 'positive response'), :update => "status" %> <span id="status"></s...

How can I update an association (has_one) in a Rails AR using link_to_remote?

This is what I have in my view: <%= link_to_remote "Responded - Positive", :url => contact_path(@contact, :status => 'positive response'), :update => "status" %> This is what I have as a route: map.resources :contacts, :has_one => :status_contact Here is what I used in my controller: def create @status_contac...

Ruby on Rails, update div on click with link_to_remote

I'm implementing a netflix-like 5 star review ratings. The goal is to have a "rating" div that serves both to enter the rating by clicking on one of the stars, as well to display the current rating. I want to update the "rating" after a users enters a new rating. For now, I can add a rating and create the association to the rated asset,...