Permalink
Browse files

changed how generate_sprites is hooked into sass compiling in rails

  • Loading branch information...
1 parent f973d16 commit f5c4b1ddfaecaaa6b2c106a613276f5adbc381ad @kratob kratob committed Jul 8, 2010
Showing with 9 additions and 8 deletions.
  1. +9 −8 lib/lemonade.rb
View
@@ -51,15 +51,16 @@ def compile(sass_filename, css_filename)
end
end
+
+require 'sass'
+require 'sass/plugin'
+
module Sass
- class Engine
- alias_method :render_without_lemonade, :render
- def render
- if result = render_without_lemonade
- Lemonade::generate_sprites
- result
- end
+ module Plugin
+ alias update_stylesheets_without_lemonade update_stylesheets
+ def update_stylesheets(*args)
+ update_stylesheets_without_lemonade(*args)
+ Lemonade::generate_sprites
end
- alias_method :to_css, :render
end
end

0 comments on commit f5c4b1d

Please sign in to comment.