Class: Backbonify::Generators::ViewsGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
ResourceHelpers
Defined in:
lib/generators/backbonify/views/views_generator.rb

Instance Method Summary collapse

Methods included from ResourceHelpers

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



12
13
14
15
16
# File 'lib/generators/backbonify/views/views_generator.rb', line 12

def create_views
  %w(page filter index show new edit).each do |view|
    template "#{view}_view.js", File.join(backbone_path, "views", plural_name, "#{view}_view.js")
  end
end