class Ping < ActiveRecord::Base belongs_to :article def send_ping(origin_url) # Taken from Why's example: # http://redhanded.hobix.com/bits/showinUpOnTechnorati.html begin server = XMLRPC::Client.new2(URI.parse(self.url).to_s) begin result = server.call("weblogUpdates.ping", config[:blog_name], origin_url) rescue XMLRPC::FaultException => e logger.error(e) end rescue Exception => e logger.error(e) end end end