Class: Genesis::SeedGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/genesis/seed/seed_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



12
13
14
15
# File 'lib/generators/genesis/seed/seed_generator.rb', line 12

def self.source_root
  File.join File.dirname(__FILE__),
            'templates'
end

Instance Method Details

#install_seedObject



17
18
19
# File 'lib/generators/genesis/seed/seed_generator.rb', line 17

def install_seed
  template "migration.erb", "db/seeds/#{environment_part}#{timestamp}_#{file_name}.rb"
end