Created
July 28, 2011 00:50
-
-
Save spastorino/1110692 to your computer and use it in GitHub Desktop.
sass-rails.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/sass/rails/monkey_patches.rb b/lib/sass/rails/monkey_patches.rb | |
| index 40c3d3c..03cf9ae 100644 | |
| --- a/lib/sass/rails/monkey_patches.rb | |
| +++ b/lib/sass/rails/monkey_patches.rb | |
| @@ -1,36 +1,3 @@ | |
| module Sass::Rails::SassContext | |
| attr_accessor :sass_config | |
| end | |
| - | |
| -module Sass::Rails::SprocketsConfig | |
| - def self.included(base) | |
| - base.alias_method_chain :asset_environment, :sass_config | |
| - end | |
| - | |
| - def asset_environment_with_sass_config(app, *args) | |
| - env = asset_environment_without_sass_config(app, *args) | |
| - env.context_class.extend(Sass::Rails::SassContext) | |
| - env.context_class.sass_config = app.config.sass | |
| - env | |
| - end | |
| -end | |
| - | |
| -begin | |
| - # Before sprockets was extracted from rails | |
| - require 'sprockets/railtie' | |
| - module Sprockets | |
| - class Railtie < ::Rails::Railtie | |
| - include Sass::Rails::SprocketsConfig | |
| - end | |
| - end | |
| -rescue LoadError | |
| - # After sprockets was extracted into sprockets-rails | |
| - require 'sprockets/rails/railtie' | |
| - module Sprockets | |
| - module Rails | |
| - class Railtie < ::Rails::Railtie | |
| - include Sass::Rails::SprocketsConfig | |
| - end | |
| - end | |
| - end | |
| -end | |
| \ No newline at end of file | |
| diff --git a/lib/sass/rails/railtie.rb b/lib/sass/rails/railtie.rb | |
| index 892bbd9..dc1b928 100644 | |
| --- a/lib/sass/rails/railtie.rb | |
| +++ b/lib/sass/rails/railtie.rb | |
| @@ -34,6 +34,8 @@ module Sass::Rails | |
| # Display a stack trace in the css output when in development-like environments. | |
| config.sass.full_exception = app.config.consider_all_requests_local | |
| end | |
| + app.assets.context_class.extend(Sass::Rails::SassContext) | |
| + app.assets.context_class.sass_config = app.config.sass | |
| end | |
| initializer :setup_compression do |app| |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment