Class: ActsAsNewsletterGenerator

Inherits:
ActiveRecord::Generators::Base
  • Object
show all
Defined in:
lib/generators/acts_as_newsletter/acts_as_newsletter_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_migrationObject



10
11
12
# File 'lib/generators/acts_as_newsletter/acts_as_newsletter_generator.rb', line 10

def generate_migration
  migration_template "migration.erb", "db/migrate/#{ migration_file_name }"
end

#noticeObject



14
15
16
# File 'lib/generators/acts_as_newsletter/acts_as_newsletter_generator.rb', line 14

def notice
  say " ** Migration created, now just add `acts_as_newsletter` macro to your #{ camelized_model } model"
end