lib/togostanza/application.rb in togostanza-1.3.2 vs lib/togostanza/application.rb in togostanza-1.3.3
- old
+ new
@@ -1,9 +1,9 @@
require 'sinatra/base'
require 'sinatra/json'
require 'sinatra/reloader'
-require 'haml'
+require 'tilt/haml'
module TogoStanza
class Application < Sinatra::Base
set :root, File.expand_path('../../..', __FILE__)
set :haml, escape_html: true
@@ -49,12 +49,12 @@
json resource_id => value
end
get '/:id/help' do |id|
- @stanza = Stanza.find(id).new
+ stanza = Stanza.find(id).new
- render :html, @stanza.help, layout_engine: :haml
+ haml :help, locals: {stanza: stanza.metadata}
end
get '/:id/metadata.json' do |id|
@stanza = Stanza.find(id).new