diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-24 15:46:29 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-24 21:02:30 +0200 |
commit | bac0826b1fa5f39274d61ad51304548c725a304f (patch) | |
tree | a8389dc480a95838925e51954a5e0a2dc658c54c /activerecord/lib/rails/generators/active_record/model/templates/module.rb | |
parent | e83634081a9222446df608106c8df5a6831d64db (diff) | |
download | rails-bac0826b1fa5f39274d61ad51304548c725a304f.tar.gz rails-bac0826b1fa5f39274d61ad51304548c725a304f.tar.bz2 rails-bac0826b1fa5f39274d61ad51304548c725a304f.zip |
Refactor namespaced generators to use module_namespacing block helper
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/rails/generators/active_record/model/templates/module.rb')
-rw-r--r-- | activerecord/lib/rails/generators/active_record/model/templates/module.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/rails/generators/active_record/model/templates/module.rb b/activerecord/lib/rails/generators/active_record/model/templates/module.rb index bb4220f038..fca2908080 100644 --- a/activerecord/lib/rails/generators/active_record/model/templates/module.rb +++ b/activerecord/lib/rails/generators/active_record/model/templates/module.rb @@ -1,5 +1,7 @@ +<% module_namespacing do -%> module <%= class_path.map(&:camelize).join('::') %> def self.table_name_prefix '<%= class_path.join('_') %>_' end end +<% end -%> |