(For people who are interested in working with actual RDF data, see RDF Status in Ruby .)
Short answer to your question: you are looking for reply_to . In general, you should write something like:
class PeopleController < ApplicationController::Base respond_to :html, :rdf def index @people = Person.all respond_to do |format| format.html format.rdf { convert_to_rdf(@people) } end end end
Of course you will have to write 'convert_to_rdf'. You may find that RDF.rb is useful for this.
source share