Class: HasFollowers::Generators::Base

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/has_followers.rb

Direct Known Subclasses

MigrationGenerator

Class Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



13
14
15
# File 'lib/generators/has_followers.rb', line 13

def self.next_migration_number(path)
  Time.now.utc.strftime("%Y%m%d%H%M%S")
end

.source_rootObject



9
10
11
# File 'lib/generators/has_followers.rb', line 9

def self.source_root
  @_has_followers_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'has_followers', generator_name, 'templates'))
end