Class: Badginator::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/badginator/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_awarded_badges_migrationObject



11
12
13
14
# File 'lib/generators/badginator/install_generator.rb', line 11

def create_awarded_badges_migration
  time_str = Time.now.strftime("%Y%m%d%H%M%S")
  copy_file "db/migrate/create_table_awarded_badges.rb", "db/migrate/#{time_str}_create_table_awarded_badges.rb"
end

#create_awarded_badges_modelObject



7
8
9
# File 'lib/generators/badginator/install_generator.rb', line 7

def create_awarded_badges_model
  copy_file "app/models/awarded_badge.rb", "app/models/awarded_badge.rb"
end