Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mrsteveheyes
Created June 24, 2011 10:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mrsteveheyes/1044564 to your computer and use it in GitHub Desktop.
Save mrsteveheyes/1044564 to your computer and use it in GitHub Desktop.
Datamapper problem
require 'datamapper'
require 'sinatra/base'
require 'mustache/sinatra'
#DataMapper.setup(:default, "mysql://localhost/happie_local")
# MODELS
# END MODELS
class App < Sinatra::Base
register Mustache::Sinatra
require 'views/layout'
set :mustache, {
:views => 'views/',
:templates => 'templates/'
}
get '/' do
@title = "Mustache + Sinatra = AWESOME"
mustache :index
end
get '/other' do
mustache :other
end
get '/nolayout' do
content_type 'text/plain'
mustache :nolayout, :layout => false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment