lib/darkext/sinatra.rb in darkhelmet-darkext-0.8.3 vs lib/darkext/sinatra.rb in darkhelmet-darkext-0.8.4

- old
+ new

@@ -13,15 +13,15 @@ # Can't make this use view() because of the flash.clear haml(page, options.merge!(:layout => false)) end def css_link_tag(sheet, media = 'screen,projection') - partial("%link{ :type => 'text/css', :href => 'stylesheets/#{sheet}.css', :rel => 'stylesheet', :media => '#{media}' }") + partial("%link{ :type => 'text/css', :href => '#{options.slash ? '/' : ''}stylesheets/#{sheet}.css', :rel => 'stylesheet', :media => '#{media}' }") end def js_script_tag(script) - partial("%script{ :type => 'text/javascript', :src => 'javascripts/#{script}.js' }") + partial("%script{ :type => 'text/javascript', :src => '#{options.slash ? '/' : ''}javascripts/#{script}.js' }") end def js_tag(script) @dsh_script = script temp = ["%script{ :type => 'text/javascript' }", @@ -59,9 +59,10 @@ end end def self.registered(app) app.helpers HelperMethods + app.disable(:slash) end end register DarkHelpers end