Class: Keinaufwand::Sync::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Keinaufwand::Sync::InstallGenerator
- Includes:
- ActiveRecord::Generators::Migration
- Defined in:
- lib/generators/keinaufwand/sync/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_media_route ⇒ Object
26 27 28 29 30 |
# File 'lib/generators/keinaufwand/sync/install/install_generator.rb', line 26 def add_media_route return unless [:media_route] route %(get "media/:id", to: "keinaufwand/assets#show", as: :keinaufwand_asset) end |
#add_webhook_route ⇒ Object
20 21 22 23 24 |
# File 'lib/generators/keinaufwand/sync/install/install_generator.rb', line 20 def add_webhook_route return unless [:webhook_route] route %(mount Keinaufwand::Sync::Engine => "/webhooks/keinaufwand", as: :keinaufwand_sync) end |
#copy_migrations ⇒ Object
14 15 16 17 18 |
# File 'lib/generators/keinaufwand/sync/install/install_generator.rb', line 14 def copy_migrations migration_template "create_keinaufwand_sync_tables.rb", "db/migrate/create_keinaufwand_sync_tables.rb" migration_template "create_keinaufwand_assets.rb", "db/migrate/create_keinaufwand_assets.rb" migration_template "create_keinaufwand_webhook_receipts.rb", "db/migrate/create_keinaufwand_webhook_receipts.rb" end |