Class: Backbonify::Generators::HbsGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Backbonify::Generators::HbsGenerator
show all
- Includes:
- ResourceHelpers
- Defined in:
- lib/generators/backbonify/hbs/hbs_generator.rb
Instance Method Summary
collapse
#application_name, #backbone_path, #collection_namespace, #js_app_name, #jst, #model_namespace, #plural_model_name, #router_namespace, #singular_model_name, #uncapitalize, #view_namespace
Instance Method Details
#create_partials ⇒ Object
20
21
22
23
24
|
# File 'lib/generators/backbonify/hbs/hbs_generator.rb', line 20
def create_partials
%w(_row _form).each do |view|
template "#{view}.haml", File.join(backbone_path, "templates", plural_name, "_#{singular_name}#{view}.jst.hbs.haml")
end
end
|
#create_templates ⇒ Object
14
15
16
17
18
|
# File 'lib/generators/backbonify/hbs/hbs_generator.rb', line 14
def create_templates
%w(page index show new edit).each do |view|
template "#{view}.haml", File.join(backbone_path, "templates", plural_name, "#{view}.jst.hbs.haml")
end
end
|