Ajax link call to function with image as icon
This railscode makes an ajaxcall to a action inside the controller and uses a image icon as the clickable area to trigger it. I am using it all over the place when doing nice looking admininterfaces.
link_to_remote (image_tag("/images/createchild.jpeg", :size => "17x17", :border => 0), :url => {:action => 'acton_inside_controller', :id => record.id })