Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Upgrading to Sinatra 1.0 and Mustache 0.9

View _README.md

Previously you'd do this:

set :namespace, Haystack
set :views, 'templates/'
set :mustaches, views/'

Now you do this:

set :mustache, {
  :namespace => Haystack,
  :templates => 'templates/',
  :views     => 'views/'
}
View _README.md
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
diff --git a/lib/haystack/app.rb b/lib/haystack/app.rb
index a4087e1..6c0ee1b 100644
--- a/lib/haystack/app.rb
+++ b/lib/haystack/app.rb
@@ -10,14 +10,16 @@ module Haystack
set :public, "#{dir}/public"
set :static, false
- # Tell mustache where the Views constant lives
- set :namespace, Haystack
+ set :mustache, {
+ # Tell mustache where the Views constant lives
+ :namespace => Haystack,
- # Mustache templates live here
- set :views, "#{dir}/templates"
+ # Mustache templates live here
+ :templates => "#{dir}/templates",
- # Tell mustache where the views are
- set :mustaches, "#{dir}/views"
+ # Tell mustache where the views are
+ :views => "#{dir}/views"
+ }
# Sinatra error handling
configure :development, :staging do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.