Permalink
Browse files

Fix for rails 2

  • Loading branch information...
tvongaza committed Feb 21, 2012
1 parent ad55af0 commit ba531caa0dff237290687cd0e7bec37fea1b45d5
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/rapi_doc.rb
View
@@ -3,7 +3,13 @@
require 'doc_util'
require 'resource_doc'
require 'rapi_config'
-require 'rapi_doc/railtie' if defined?(Rails)
+if defined?(Rails)
+ if Rails.version =~ /^3\./
+ require 'rapi_doc/railtie'
+ else
+ Dir["#{Gem.searcher.find('<gemname>').full_gem_path}/lib/tasks/**/*.rake"].each { |ext| load ext }
+ end
+end
module RapiDoc
class RAPIDoc

0 comments on commit ba531ca

Please sign in to comment.