lib/active_assets.rb in active_assets-0.2.8 vs lib/active_assets.rb in active_assets-0.3.0
- old
+ new
@@ -1,8 +1,16 @@
require 'active_support'
module ActiveAssets
- extend ActiveSupport::Autoload
+ autoload :ActiveExpansions, 'active_assets/active_expansions'
+ autoload :ActiveSprites, 'active_assets/active_sprites'
- autoload :ActiveExpansions
- autoload :ActiveSprites
+ def self.rails2?
+ rv = Rails.version rescue nil
+ rv ||= RAILS_GEM_VERSION rescue nil
+ rv ||= Gem.loaded_specs.find { |n,spec| n == 'rails' }[1].version.to_s
+
+ Gem::Version.new(rv) < Gem::Version.new('3.0.0.beta')
+ end
end
+
+require 'active_assets/rails2_support' if ActiveAssets.rails2?
\ No newline at end of file