Class: Ember::Generators::ScaffoldGenerator
Instance Method Summary
collapse
#create_model_files, #create_test_files
#app_path, #application_name, #class_name, #config_path, #configuration, #engine_name, #handlebars_template_path, #javascript_assets_path, #rails_engine?, #require_name
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, '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
|
#create_tests ⇒ Object
24
25
26
27
28
|
# File 'lib/generators/ember/scaffold_generator.rb', line 24
def create_tests
["route"].each do |type|
create_test_files_for(type)
end
end
|