Permalink
Browse files

Merge branch 'migration_invocation'

* migration_invocation:
  added invocations for migration generator
  • Loading branch information...
2 parents f5de2f6 + 8cffdb0 commit eabab3ab17d0622cd4b2424eaff87fa09e7e3b0d @michaelklishin michaelklishin committed Aug 8, 2008
Showing with 8 additions and 0 deletions.
  1. +4 −0 merb_activerecord/lib/generators/model.rb
  2. +4 −0 merb_sequel/lib/generators/model.rb
@@ -1,4 +1,8 @@
Merb::Generators::ModelGenerator.template :model_activerecord, :orm => :activerecord do
source(File.dirname(__FILE__), "templates/model/app/models/%file_name%.rb")
destination("app/models", base_path, "#{file_name}.rb")
+end
+
+Merb::Generators::ModelGenerator.invoke :migration, :orm => :activerecord do |generator|
+ generator.new(destination_root, options.merge(:model => true), file_name, attributes)
end
@@ -1,4 +1,8 @@
Merb::Generators::ModelGenerator.template :model_sequel, :orm => :sequel do
source(File.dirname(__FILE__), "templates/model/app/models/%file_name%.rb")
destination("app/models", base_path, "#{file_name}.rb")
+end
+
+Merb::Generators::ModelGenerator.invoke :migration, :orm => :sequel do |generator|
+ generator.new(destination_root, options.merge(:model => true), file_name, attributes)
end

0 comments on commit eabab3a

Please sign in to comment.