‘single_message’ should normally be set to false. I added it in just in case I needed to render a single message for an ajax call. If you aren’t rendering an entire tree and thus have only one node then passing ‘single_message = true’ will force the method to call the database to get the level…
Category: jQuery
Ajax calls using jQuery in Ruby on Rails
jQuery is the hot javascript library and it is small and it is cooler than Prototype, the default library that comes with Ruby on Rails. Ergo I plugged it in and pulled out everything else. The ajax calls are very simple and look like this: $.post(“function_name”,{ key:value } ,function(data) { // do stuff with data…