Class: Protoform::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Protoform::InstallGenerator
- Defined in:
- lib/generators/protoform/install/install_generator.rb
Constant Summary collapse
Instance Method Summary collapse
Instance Method Details
#autoload_components ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/generators/protoform/install/install_generator.rb', line 18 def autoload_components return unless APPLICATION_CONFIGURATION_PATH.exist? inject_into_class( APPLICATION_CONFIGURATION_PATH, "Application", %( config.autoload_paths << "\#{root}/app/views/forms"\n) ) end |
#create_application_form ⇒ Object
28 29 30 31 |
# File 'lib/generators/protoform/install/install_generator.rb', line 28 def create_application_form template "application_form.rb", Rails.root.join("app/views/forms/application_form.rb") end |
#install_phlex_rails ⇒ Object
11 12 13 14 15 16 |
# File 'lib/generators/protoform/install/install_generator.rb', line 11 def install_phlex_rails return if gem_in_bundle? "phlex-rails" gem "phlex-rails" generate "phlex:install" end |