lib/darkext/sinatra.rb in darkhelmet-darkext-0.8.7 vs lib/darkext/sinatra.rb in darkhelmet-darkext-0.9.0

- old
+ new

@@ -1,18 +1,15 @@ -require 'sinatra/base' - module Sinatra module DarkHelpers module HelperMethods def view(view, options = {}) html = haml(view,options) flash.clear html end def partial(template, options = {}) - options = args.extract_options! options.merge!(:layout => false) if collection = options.delete(:collection) then collection.inject([]) do |buffer, member| buffer << haml(template, options.merge(:layout => false, :locals => {template.to_sym => member})) @@ -61,10 +58,10 @@ def set_title(extra) @title = "#{options.site_name} - #{extra}" end def base - "#{host}#{options.site_base}" + host + options.site_base end end def self.registered(app) app.helpers HelperMethods