diff --git a/doc-src/SASS_CHANGELOG.md b/doc-src/SASS_CHANGELOG.md index ba4f884a11..4056c5dea8 100644 --- a/doc-src/SASS_CHANGELOG.md +++ b/doc-src/SASS_CHANGELOG.md @@ -12,6 +12,10 @@ * Properly insert the Rack middleware so that stylesheets are updated on each request. +### Merb Rack Support + +The Sass Rails plugin now works using Rack middleware by default. + ## 3.0.0.rc.2 [Tagged on GitHub](http://github.com/nex3/haml/commit/3.0.0.rc.2). diff --git a/lib/sass/plugin/merb.rb b/lib/sass/plugin/merb.rb index 187fcf8cc3..1c909781a7 100644 --- a/lib/sass/plugin/merb.rb +++ b/lib/sass/plugin/merb.rb @@ -24,27 +24,6 @@ Sass::Plugin.options.merge!(config) - if version[0] > 0 || version[1] >= 9 - - class Merb::Rack::Application - def call_with_sass(env) - Sass::Plugin.check_for_updates - call_without_sass(env) - end - alias_method :call_without_sass, :call - alias_method :call, :call_with_sass - end - - else - - class MerbHandler - def process_with_sass(request, response) - Sass::Plugin.check_for_updates - process_without_sass(request, response) - end - alias_method :process_without_sass, :process - alias_method :process, :process_with_sass - end - - end + require 'sass/plugin/rack' + Merb::Config[:app].use Sass::Plugin::Rack end