In Rails, respond_to is used to return different formats (HTML, JSON, etc.) from the same action. But for now, check Plumber Prince George.