aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/rails/generators/active_record/model
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-09-24 21:54:16 +0200
committerJosé Valim <jose.valim@gmail.com>2010-09-25 10:46:22 +0200
commit00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae (patch)
tree697afb805c5ca1e0186b09357ad49071a717944b /activerecord/lib/rails/generators/active_record/model
parentfb08e334d61b1706db754733b209075b0154b57e (diff)
downloadrails-00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae.tar.gz
rails-00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae.tar.bz2
rails-00aa13bc0e3fdcc92152e22cc48a6d8bd21122ae.zip
Generators fix: properly check if module should be created when creating a namespaced model
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/rails/generators/active_record/model')
-rw-r--r--activerecord/lib/rails/generators/active_record/model/model_generator.rb2
1 files changed, 1 insertions, 1 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..c75abd043c 100644
--- a/activerecord/lib/rails/generators/active_record/model/model_generator.rb
+++ b/activerecord/lib/rails/generators/active_record/model/model_generator.rb
@@ -21,7 +21,7 @@ module ActiveRecord
end
def create_module_file
- return if class_path.empty?
+ return if regular_class_path.empty?
template 'module.rb', File.join('app/models', "#{class_path.join('/')}.rb") if behavior == :invoke
end