Class: ActsAsCommentableGenerator

Inherits:
ActsAsAbleGenerator show all
Defined in:
lib/generators/acts_as_commentable_generator.rb

Instance Method Summary collapse

Methods inherited from ActsAsAbleGenerator

next_migration_number, source_root

Instance Method Details

#create_migration_fileObject



4
5
6
# File 'lib/generators/acts_as_commentable_generator.rb', line 4

def create_migration_file
  migration_template 'comment_migration.rb', 'db/migrate/acts_as_commentable_migration.rb'
end

#create_modelObject



8
9
10
# File 'lib/generators/acts_as_commentable_generator.rb', line 8

def create_model
  template "comment.rb", File.join('app/models', "comment.rb")
end