Sha256: d38faf4f2182424e4b8c0d9c291c9fa412bf79ba4f95cf39aca02971038b62fd

Contents?: true

Size: 1.17 KB

Versions: 39

Compression:

Stored size: 1.17 KB

Contents

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

  Sass::Plugin.options.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 != "production",
                              :full_exception    => Haml::Util.rails_env != "production")

  if defined?(Rails.configuration) && defined?(Rails.configuration.middleware)
    # Rails >= 3.0
    require 'sass/plugin/rack'
    Rails.configuration.middleware.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

39 entries across 39 versions & 2 rubygems

Version Path
haml-edge-2.3.197 lib/sass/plugin/rails.rb
haml-edge-2.3.196 lib/sass/plugin/rails.rb
haml-edge-2.3.195 lib/sass/plugin/rails.rb
haml-edge-2.3.194 lib/sass/plugin/rails.rb
haml-edge-2.3.193 lib/sass/plugin/rails.rb
haml-edge-2.3.192 lib/sass/plugin/rails.rb
haml-edge-2.3.191 lib/sass/plugin/rails.rb
haml-edge-2.3.190 lib/sass/plugin/rails.rb
haml-edge-2.3.189 lib/sass/plugin/rails.rb
haml-edge-2.3.188 lib/sass/plugin/rails.rb
haml-edge-2.3.187 lib/sass/plugin/rails.rb
haml-edge-2.3.186 lib/sass/plugin/rails.rb
haml-edge-2.3.185 lib/sass/plugin/rails.rb
haml-edge-2.3.184 lib/sass/plugin/rails.rb
haml-3.0.0.beta.1 lib/sass/plugin/rails.rb
haml-edge-2.3.183 lib/sass/plugin/rails.rb
haml-edge-2.3.182 lib/sass/plugin/rails.rb
haml-edge-2.3.181 lib/sass/plugin/rails.rb
haml-edge-2.3.180 lib/sass/plugin/rails.rb
haml-edge-2.3.179 lib/sass/plugin/rails.rb