Permalink
Browse files

r3416@asus: jeremy | 2005-12-09 15:07:21 -0800

 Apply [3262] to stable.  Generator looks in vendor/generators also.


git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/stable@3263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent eb79743 commit d2b0cc7bf4c08a4ea137b4a752bb1cc0994d7d3a @jeremy jeremy committed Dec 9, 2005
Showing with 7 additions and 2 deletions.
  1. +2 −0 railties/CHANGELOG
  2. +5 −2 railties/lib/rails_generator/lookup.rb
View
@@ -1,5 +1,7 @@
*SVN*
+* Generator looks in vendor/generators also. [Chad Fowler]
+
* Generator copies files in binary mode. #3156 [minimudboy@gmail.com]
@@ -98,8 +98,11 @@ def use_application_sources!
# 4. Builtins. Model, controller, mailer, scaffold.
def use_component_sources!
reset_sources
- sources << PathSource.new(:app, "#{::RAILS_ROOT}/lib/generators") if defined? ::RAILS_ROOT
- sources << PathSource.new(:plugins, "#{::RAILS_ROOT}/vendor/plugins/**/generators") if defined? ::RAILS_ROOT
+ if defined? ::RAILS_ROOT
+ sources << PathSource.new(:app, "#{::RAILS_ROOT}/lib/generators")
+ sources << PathSource.new(:app, "#{::RAILS_ROOT}/vendor/generators")
+ sources << PathSource.new(:plugins, "#{::RAILS_ROOT}/vendor/plugins/**/generators")
+ end
sources << PathSource.new(:user, "#{Dir.user_home}/.rails/generators")
sources << GemSource.new if Object.const_defined?(:Gem)
sources << PathSource.new(:builtin, "#{File.dirname(__FILE__)}/generators/components")

0 comments on commit d2b0cc7

Please sign in to comment.