The updated version is now available, go check it out.
]]>This has been giving me real though time for more than a week now and I will really appreciate your help in this regard and I am pretty sure it will be helpful to lots of people out there too.
Thanks.
]]>Everything has moved away from prototype and to unobtrusive JS with jquery.
So now you would do something like $(‘#artist_id’).change(function() { do your jquery ajax call here });
Also, you’ll need to change the render :update bits. Just create a actionname.js.erb file in your views path for the controller. Then move the code from within the render :update block to the js.erb file, making whatever necessary changes.
I’ll see about doing a 2012 version of this tutorial.
]]>undefined method `remote_function’ for #<#:0xa033f68>
What should I do?
]]> page.replace_html ‘artists’, :partial => ‘artists’, :object => artists
page.replace_html ‘songs’, :partial => ‘songs’, :object => songs
“Element doesn’t support this property or method” error is seen which is displayed as a pop up on changing the value of the drop down list box.
]]>This article was also written at a time when prototype was included. You’ll need to make jQuery modifications.
]]>Yes, you do need to specify the routes now. At the time of writing, there was a catch-all mapping for any :controller/:action that was not previously handled.
]]>I added the route through routes.erb. Now I am getting the error “Ajax undefined”. I am not able to the code hitting the update_releases in my controller.
I have projects which contains releases which in turn contains cycles.
Please let me know if routes are to be created for update_artists and update_songs.I am getting No route matches error.
]]>