action: public function executeAddComment() { return "hello by ajax!"; } the template that calls the action remotely:
= submit_tag('Add comment'); ?> or = link_to_function('cancel', visual_effect('toggle_slide', 'add-comment'), array('duration' => 0.5)); ?>