Sha256: 5d7f51fb5e5275a33ac19c8308467f554b4a1b1c8ec8315b41acb793502ad599

Contents?: true

Size: 1.38 KB

Versions: 55

Compression:

Stored size: 1.38 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'
    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

55 entries across 55 versions & 4 rubygems

Version Path
radiant-1.0.0.rc1 vendor/plugins/haml/lib/sass/plugin/rails.rb
haml-3.0.25 lib/sass/plugin/rails.rb
radiantcms-couchrest_model-0.1.3 vendor/plugins/haml/lib/sass/plugin/rails.rb
radiantcms-couchrest_model-0.1.2 vendor/plugins/haml/lib/sass/plugin/rails.rb
radiantcms-couchrest_model-0.1.1 vendor/plugins/haml/lib/sass/plugin/rails.rb
radiantcms-couchrest_model-0.1 vendor/plugins/haml/lib/sass/plugin/rails.rb
haml-3.0.24 lib/sass/plugin/rails.rb
haml-3.0.23 lib/sass/plugin/rails.rb
haml-3.0.22 lib/sass/plugin/rails.rb
haml-3.0.21 lib/sass/plugin/rails.rb
haml-edge-3.1.73 lib/sass/plugin/rails.rb
haml-edge-3.1.72 lib/sass/plugin/rails.rb
haml-edge-3.1.71 lib/sass/plugin/rails.rb
haml-3.0.18 lib/sass/plugin/rails.rb
haml-edge-3.1.70 lib/sass/plugin/rails.rb
haml-edge-3.1.69 lib/sass/plugin/rails.rb
haml-edge-3.1.68 lib/sass/plugin/rails.rb
haml-edge-3.1.67 lib/sass/plugin/rails.rb
haml-edge-3.1.66 lib/sass/plugin/rails.rb
haml-edge-3.1.65 lib/sass/plugin/rails.rb