def update formats = ["html","xml","js"] respond_to do |f| self.send("update_#{response[0]}") unless (response=formats.select{|x| f.send(x)}).empty? end end