Skip to content Skip to sidebar Skip to footer

Passing Specific Data On Partials Using Ajax In Rails

I'm new to rails and what I'm trying to do is the following: I'm creating a store and unstore button to save and 'un-save' the event respectively. I used my event attributes and c

Solution 1:

In your action create and delete in the controller you should instantiate your variable event: change event by @event and change your js to:

$("#store_form").html("<%= escape_javascript(render 'shared/unstore') %>

because you don´t need add instantiate vars to render calls, rails is doing for you

Post a Comment for "Passing Specific Data On Partials Using Ajax In Rails"