mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Don't load the Rails 2 shim under Rails 3.
Closes gh-299
This commit is contained in:
parent
9bf8c1644f
commit
13f065cfd7
1 changed files with 3 additions and 2 deletions
|
@ -25,9 +25,10 @@ module Haml
|
||||||
# This isn't actually used;
|
# This isn't actually used;
|
||||||
# it's just passed in in case it needs to be used in the future
|
# it's just passed in in case it needs to be used in the future
|
||||||
def self.init_rails(binding)
|
def self.init_rails(binding)
|
||||||
# Rails 2.2+
|
# 2.2 <= Rails < 3
|
||||||
if defined?(Rails) && Rails.respond_to?(:configuration) &&
|
if defined?(Rails) && Rails.respond_to?(:configuration) &&
|
||||||
Rails.configuration.respond_to?(:after_initialize)
|
Rails.configuration.respond_to?(:after_initialize) &&
|
||||||
|
!Haml::Util.ap_geq_3?
|
||||||
Rails.configuration.after_initialize do
|
Rails.configuration.after_initialize do
|
||||||
next if defined?(Sass)
|
next if defined?(Sass)
|
||||||
autoload(:Sass, 'sass/rails2_shim')
|
autoload(:Sass, 'sass/rails2_shim')
|
||||||
|
|
Loading…
Add table
Reference in a new issue