Class: AwsRecord::Generators::ErbGenerator
- Inherits:
-
Base
- Object
- Rails::Generators::NamedBase
- Base
- AwsRecord::Generators::ErbGenerator
- Includes:
- Rails::Generators::ResourceHelpers
- Defined in:
- lib/generators/aws_record/erb/erb_generator.rb
Instance Attribute Summary
Attributes inherited from Base
#gsi_rw_units, #gsis, #length_validations, #primary_read_units, #primary_write_units, #required_attrs
Instance Method Summary collapse
- #copy_view_files ⇒ Object
- #create_root_folder ⇒ Object
-
#initialize(args, *options) ⇒ ErbGenerator
constructor
A new instance of ErbGenerator.
Constructor Details
#initialize(args, *options) ⇒ ErbGenerator
Returns a new instance of ErbGenerator.
14 15 16 17 |
# File 'lib/generators/aws_record/erb/erb_generator.rb', line 14 def initialize(args, *) [0] << '--skip-table-config' super end |
Instance Method Details
#copy_view_files ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/generators/aws_record/erb/erb_generator.rb', line 23 def copy_view_files available_views.each do |view| formats.each do |format| filename = filename_with_extensions(view, format) template filename, File.join('app/views', controller_file_path, filename) end end end |
#create_root_folder ⇒ Object
19 20 21 |
# File 'lib/generators/aws_record/erb/erb_generator.rb', line 19 def create_root_folder empty_directory File.join('app/views', controller_file_path) end |