Class: ActiveFields::Generators::ScaffoldGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- ActiveFields::Generators::ScaffoldGenerator
- Defined in:
- lib/generators/active_fields/scaffold/scaffold_generator.rb
Instance Method Summary collapse
Instance Method Details
#add_routes ⇒ Object
20 21 22 |
# File 'lib/generators/active_fields/scaffold/scaffold_generator.rb', line 20 def add_routes route "resources :active_fields" end |
#copy_files ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/generators/active_fields/scaffold/scaffold_generator.rb', line 12 def copy_files Dir.glob("**/*", base: self.class.source_root).each do |path| next unless File.file?(File.(path, self.class.source_root)) copy_file path, File.join("app", path) end end |