Created
May 13, 2009 19:13
-
-
Save rue/111224 to your computer and use it in GitHub Desktop.
This file contains 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
## App/Site | |
application :FarmNoises do | |
layout_for "text/html" => Waves::Renderers::Hoshi, :template => "templates/html/layout.meh" | |
end | |
## Resource | |
resource :Moo do | |
renderer_for "text/x-markdown" => lambda {|content| "<div>" + Markdown.render content "</div>" } | |
renderer_for "text/html" => Waves::Renderers::Hoshi, :template_location => "some pathspec or something" | |
viewable { | |
representation "text/plain", "text/x-markdown" do | |
# The latter just designates the actual Content-Type | |
response_is "text/x-markdown" => "text/html" do | |
do_something_returning_string_in_markdown | |
end | |
end | |
} | |
end | |
## So, effectively something like: | |
HoshiRenderer.new(layout).process(MarkdownRenderer.new.call(content_block.call())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment