Class: Generators::Avo::AllResourcesGenerator
- Inherits:
-
BaseGenerator
- Object
- Rails::Generators::Base
- BaseGenerator
- Generators::Avo::AllResourcesGenerator
- Defined in:
- lib/generators/avo/all_resources_generator.rb
Instance Method Summary collapse
Methods inherited from BaseGenerator
Constructor Details
This class inherits a constructor from Generators::Avo::BaseGenerator
Instance Method Details
#task ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/generators/avo/all_resources_generator.rb', line 8 def task # Rails.application.eager_load! # get all models models = fetch_models models.delete("ApplicationRecord") models .each do |model| Rails::Generators.invoke "avo:resource", [model.underscore], {} rescue => e puts "Error: #{e.}" end end |