Separating out Rails2 actionpack integration logic

Rails3 has different internal implementations on ActionPack which is causing breakage when trying to calculate image_paths. Lets only calculate this logic for Rails 2 at the moment, and figure out what to do with Rails3 later
This commit is contained in:
Jacques Crocker 2010-02-20 12:43:10 -08:00
parent 3dd2a90dec
commit 719cd980ae
4 changed files with 8 additions and 4 deletions

View File

@ -1,8 +1,12 @@
unless defined?(Compass::RAILS_LOADED) unless defined?(Compass::RAILS_LOADED)
Compass::RAILS_LOADED = true Compass::RAILS_LOADED = true
if ActionPack::VERSION::MAJOR >= 3
# figure something out so image_path works with rails integration
else
%w(action_controller sass_plugin urls).each do |lib| %w(action_controller sass_plugin urls).each do |lib|
require "compass/app_integration/rails/#{lib}" require "compass/app_integration/rails/actionpack2/#{lib}"
end
end end
# Wierd that this has to be re-included to pick up sub-modules. Ruby bug? # Wierd that this has to be re-included to pick up sub-modules. Ruby bug?