Created
March 21, 2011 20:19
-
-
Save buzzedword/880142 to your computer and use it in GitHub Desktop.
Javascript routing file using CoffeeScript in Monk
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
class Main | |
get "/js/:application.js" do | |
content_type "text/javascript", :charset => "UTF-8" | |
CoffeeScript.compile File.read("app/views/js/#{params[:application]}.coffee") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment