Created
May 29, 2009 22:54
-
-
Save dyoder/120257 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment