Class: Ember::Generators::ScaffoldGenerator
Instance Method Summary
collapse
#create_model_files
#app_path, #application_name, #class_name, #config_path, #configuration, #engine_name, #handlebars_template_path, #javascript_assets_path, #rails_engine?
Instance Method Details
#create_route_files ⇒ Object
13
14
15
16
|
# File 'lib/generators/ember/scaffold_generator.rb', line 13
def create_route_files
create_resource_files_for(:route, 'js.es6')
inject_into_router_file(file_name)
end
|
#create_template_files ⇒ Object
18
19
20
21
22
|
# File 'lib/generators/ember/scaffold_generator.rb', line 18
def create_template_files
create_resource_files_for(:template, 'hbs')
template "scaffold/template.hbs", File.join(app_path, 'templates', "#{file_name.pluralize}.hbs")
template "scaffold/template/form.hbs", File.join(app_path, 'templates', file_name.pluralize, 'form.hbs')
end
|