Rails and UJS guide - not having much luck

I refered to http://railsdog.com/blog/2011/02/28/callbacks-in-jquery-ujs-in-rails3/ in hope of getting json data from my controller and displaying it in my view when an ajax request is made.

I followed the instructions on the http://railsdog.com/blog/2011/02/28/callbacks-in-jquery-ujs-in-rails3/ and even corresponded with the author and also implemented his 'fix' in https://gist.github.com/1203326.

In relation to the article, I could never get the javascript in application.js to display the value of 'name'. In fact, the alert box does not even show up but when I delete data.name from it, the alert box does show with the static message.

I can't seem to get it to work.

Has anyone managed to get it to work?

Thank you all.



thank you