Skip to content
Browse files

Added generator template command

  • Loading branch information...
1 parent 781f8ea commit 8597471b30d1434528f612de1f850b621e9b258f @davidchua davidchua committed Oct 20, 2009
Showing with 7 additions and 4 deletions.
  1. +7 −4 generators/has_messages/has_messages_generator.rb
View
11 generators/has_messages/has_messages_generator.rb
@@ -10,12 +10,15 @@ def manifest
m.directory 'db/migrate'
if options[:email]
-
- # create view directory for Notifier
- # copy Notifier.rb into app/models
+ m.directory 'app/views/notifier'
+ m.template 'message_with_email.rb', File.join('app/models', "message.rb")
+ m.template 'notifier.rb', File.join('app/models', "notifier.rb")
+ m.template 'views/message_notification.html.erb', File.join('app/views/notifier', "message_notification.html.erb")
+ else
+ m.template 'message.rb', File.join('app/models', "message.rb")
end
- m.template 'message.rb', File.join('app/models', "message.rb")
+
unless options[:skip_migration]
m.migration_template 'migration.rb', 'db/migrate', :assigns => {

0 comments on commit 8597471

Please sign in to comment.
Something went wrong with that request. Please try again.