RESTful XHTML plugin

Plugin details

RestfulXHTML extends Rails' MIME vocabulary to include application/xhtml+xml (XHTML).

Websitehttp://piano.altipla.no/pages/restful_xhtml Repositoryhttp://nimrod.interinter.net/plugins/trunk/restful_xhtml Author Tore Darell Tags Rest, xhtml LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://nimrod.interinter.net/plugins/trunk/restful_xhtml

Usage
========

Basically, just use respond_to like you did before, but now you can add a format.xhtml to respond to browsers that want XHTML:

  def index
    @kittens = Kitten.find(:all, :conditions => ['cute = ?', true])
    
    respond_to do |format|
      format.xhtml
      format.html
      format.xml{ render :xml => @kittens.to_xml }
    end
  end

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 9 months ago