Respond_to Hack
View as text
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
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
SnippetStash costs money to host and develop. The service is free for everyone to use
but if you found it useful please consider making a small donation.