STI and Multiple Databases in Rails

I admit, I believed it when DHH said that Rails apps should communicate via REST if they want access to a shared database. I bought into the hype and even wrote a plugin to make this easier. Well, it’s slow. I don’t have real numbers, of course, because I’m not the type of person to […]

Retrieving Random Elements from an ActiveRecord

This one is short but not something I immediately thought of. It doesn’t rely on an ActiveRecord abstraction, but I originally thought it would need to, so the title is to save future Web searchers. The idea is that you want to create a list of all the Users, but ordered randomly. It turns out […]

response_from: the opposite of respond_to render :xml

Update: This can be replaced, mostly, with Rails 2.0’s ActiveRecord#from_xml. As I assured in a prior post, I spent today hacking on a plugin to make it easier to consume XML REST APIs. The result is the ResponseFrom plugin. It's the opposite of this:  respond_to { |w| w.xml { render :xml => User.find_first } } […]