Class: Ember::Generators::ResourceGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
GeneratorHelpers
Defined in:
lib/generators/ember/resource_generator.rb

Instance Method Summary collapse

Methods included from GeneratorHelpers

#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_resource_filesObject



16
17
18
19
20
21
22
23
# File 'lib/generators/ember/resource_generator.rb', line 16

def create_resource_files
  unless options[:skip_route]
    invoke('ember:route', [ name.pluralize ], options)
    inject_into_router_file(name)
  end
  invoke('ember:controller', [ name.pluralize ], options)
  invoke('ember:template', [ name.pluralize ], options)
end