Class: SeedUpgrade::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- SeedUpgrade::InstallGenerator
- Defined in:
- lib/generators/seed_upgrade/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_seeds_for_dev_file ⇒ Object
16 17 18 |
# File 'lib/generators/seed_upgrade/install/install_generator.rb', line 16 def create_seeds_for_dev_file template 'seeds_for_dev.rb', 'db/seeds_for_dev.rb' end |
#create_seeds_for_dev_rake ⇒ Object
20 21 22 |
# File 'lib/generators/seed_upgrade/install/install_generator.rb', line 20 def create_seeds_for_dev_rake template 'application.rake', 'lib/tasks/application.rake' end |
#mkdir_seeds_dir ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/generators/seed_upgrade/install/install_generator.rb', line 4 def mkdir_seeds_dir create_file 'db/seeds/USAGE' do %Q` Generate seed with model, if you use machinist, e.g. # user.rb 10.times { User.make! } ` end end |