diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-23 19:13:07 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-24 21:02:24 +0200 |
commit | e83634081a9222446df608106c8df5a6831d64db (patch) | |
tree | f40a69c6b4e863b93d9e0ed1bb9af4cd97cde8a5 /activerecord/lib/rails/generators/active_record/model/model_generator.rb | |
parent | 55b6fa9370dbdac23b0df2bbcb70b2e2d604b410 (diff) | |
download | rails-e83634081a9222446df608106c8df5a6831d64db.tar.gz rails-e83634081a9222446df608106c8df5a6831d64db.tar.bz2 rails-e83634081a9222446df608106c8df5a6831d64db.zip |
Generators are not aware of namespace of isolated engines and applications
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/rails/generators/active_record/model/model_generator.rb')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/model/model_generator.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/rails/generators/active_record/model/model_generator.rb b/activerecord/lib/rails/generators/active_record/model/model_generator.rb index 960c29c49c..bb53c489be 100644 --- a/activerecord/lib/rails/generators/active_record/model/model_generator.rb +++ b/activerecord/lib/rails/generators/active_record/model/model_generator.rb @@ -17,12 +17,12 @@ module ActiveRecord end def create_model_file - template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") + namespaced_template 'model.rb', File.join('app/models', class_path, "#{file_name}.rb") end def create_module_file return if class_path.empty? - template 'module.rb', File.join('app/models', "#{class_path.join('/')}.rb") if behavior == :invoke + namespaced_template 'module.rb', File.join('app/models', "#{class_path.join('/')}.rb") if behavior == :invoke end hook_for :test_framework |