Sha256: 4c825f5e279f3e43c6001723c3c744400f66a73f5982875df5b5033ba2a87860

Contents?: true

Size: 1.37 KB

Versions: 19

Compression:

Stored size: 1.37 KB

Contents

unless defined?(Sass::RAILS_LOADED)
  Sass::RAILS_LOADED = true

  # Reverse-merging (we're in Rails, anyway) so we dont' clobber what's already been defined further up-stream
  Sass::Plugin.options.reverse_merge!(:template_location => Haml::Util.rails_root + '/public/stylesheets/sass',
                                      :css_location      => Haml::Util.rails_root + '/public/stylesheets',
                                      :cache_location    => Haml::Util.rails_root + '/tmp/sass-cache',
                                      :always_check      => Haml::Util.rails_env == "development",
                                      :quiet             => Haml::Util.rails_env != "production",
                                      :full_exception    => Haml::Util.rails_env != "production")

  if defined?(ActionController::Metal)
    # Rails >= 3.0
    require 'sass/plugin/rack'
    ActionController::Metal.use(Sass::Plugin::Rack)
  elsif defined?(ActionController::Dispatcher) &&
      defined?(ActionController::Dispatcher.middleware)
    # Rails >= 2.3
    require 'sass/plugin/rack'
    ActionController::Dispatcher.middleware.use(Sass::Plugin::Rack)
  else
    module ActionController
      class Base
        alias_method :sass_old_process, :process
        def process(*args)
          Sass::Plugin.check_for_updates
          sass_old_process(*args)
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
haml-edge-3.1.33 lib/sass/plugin/rails.rb
haml-edge-3.1.32 lib/sass/plugin/rails.rb
haml-3.0.9 lib/sass/plugin/rails.rb
haml-edge-3.1.29 lib/sass/plugin/rails.rb
haml-3.0.7 lib/sass/plugin/rails.rb
haml-edge-3.1.28 lib/sass/plugin/rails.rb
haml-edge-3.1.27 lib/sass/plugin/rails.rb
haml-edge-3.1.26 lib/sass/plugin/rails.rb
haml-edge-3.1.25 lib/sass/plugin/rails.rb
haml-edge-3.1.24 lib/sass/plugin/rails.rb
haml-edge-3.1.23 lib/sass/plugin/rails.rb
haml-3.0.6 lib/sass/plugin/rails.rb
haml-edge-3.1.22 lib/sass/plugin/rails.rb
haml-3.0.5 lib/sass/plugin/rails.rb
haml-edge-3.1.21 lib/sass/plugin/rails.rb
haml-edge-3.1.20 lib/sass/plugin/rails.rb
haml-edge-3.1.19 lib/sass/plugin/rails.rb
haml-edge-3.1.18 lib/sass/plugin/rails.rb
haml-edge-3.1.17 lib/sass/plugin/rails.rb