Class: Reso::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Reso::Generators::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/reso/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(path) ⇒ Object
10 11 12 |
# File 'lib/generators/reso/install_generator.rb', line 10 def self.next_migration_number(path) Time.now.utc.strftime("%Y%m%d%H%M%S%L") end |
Instance Method Details
#create_model_file ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/generators/reso/install_generator.rb', line 14 def create_model_file template "enumerations.csv", "db/enumerations.csv" %w[addresses businesses enumerations expenses imports import_results listings listing_media listing_providers multiple_listing_services open_houses offices people participants participant_licenses places prices queued_listings rooms schools taxes join_tables].each do |name| migration_template "create_#{name}.rb", "db/migrate/create_#{name}.rb" end end |