Skip to content

Commit

Permalink
[Sass] Use Rack on Merb by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Apr 28, 2010
1 parent 39ad0af commit b37af7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
4 changes: 4 additions & 0 deletions doc-src/SASS_CHANGELOG.md
Expand Up @@ -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).
Expand Down
25 changes: 2 additions & 23 deletions lib/sass/plugin/merb.rb
Expand Up @@ -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

0 comments on commit b37af7d

Please sign in to comment.