representation "text/html", "application/xhtml+xml" do transitions do view "Edit page", Site/Page/URL, "application/vnd.com.example.wiki.page.editable" view "View raw contents", Site/Page/URL, "text/plain" view "Show page history", Site/History/URL view "Other pages under #{path}", Site/Pages/path end response_is("text/html") { processor.call request } rendered_by Hoshi, :from => "p/page.rb" end representation "application/vnd.com.example.wiki.page.editable" do transitions do view "Cancel Editing", Site/Page/URL # GET default MIME view "View raw contents", Site/Page/URL, "text/plain" view "Show page history", Site/History/URL view "Other pages under #{path}", Site/Pages/path delete "Delete This Page", Site/Page/URL # DELETE update "Commit Your Changes", Site/Page/URL # POST end response_is("text/html") { processor.call request } rendered_by Hoshi, :from => "p/editable_page.rb" end