Class: KonoUtilsBootstrapView4::ConceptGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- KonoUtilsBootstrapView4::ConceptGenerator
- Includes:
- ActiveSupport::Inflector
- Defined in:
- lib/generators/kono_utils_bootstrap_view4/concept/concept_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_templates ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/generators/kono_utils_bootstrap_view4/concept/concept_generator.rb', line 61 def copy_templates if .field_selector template 'forms/field_selector.template', File.join(path, "cell", "forms", "field_selector.rb") end if .form template 'form.template', File.join(path, "cell", "form.rb") end end |
#generate_folders ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/generators/kono_utils_bootstrap_view4/concept/concept_generator.rb', line 14 def generate_folders if safe_constantize(model_name) FileUtils.mkdir_p(File.join(path, 'cell')) FileUtils.mkdir_p(File.join(path, 'view')) else puts "Modello inesistente" end end |