Class: ActiveStorageSaas::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActiveStorageSaas::InstallGenerator
- Defined in:
- lib/generators/active_storage_saas/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_files ⇒ Object
15 16 17 |
# File 'lib/generators/active_storage_saas/install/install_generator.rb', line 15 def copy_files template 'config/initializers/active_storage_saas.rb' end |
#generate_model ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/generators/active_storage_saas/install/install_generator.rb', line 6 def generate_model generate "model", "#{['configuration_model']} service_name service_options:json" inject_into_file "app/models/#{['configuration_model'].underscore}.rb", after: /^class .+\n/ do <<-'RUBY' include ActiveStorageSaas::StorageServiceConfigurationMixin RUBY end end |