Class: Thorax::Generators::ModelGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Includes:
ResourceHelpers
Defined in:
lib/generators/thorax/model/model_generator.rb

Instance Method Summary collapse

Methods included from ResourceHelpers

#application_name, #collection_namespace, #hbs, #js_app_name, #model_namespace, #plural_model_name, #router_namespace, #singular_model_name, #template_path, #thorax_path, #uncapitalize, #view_namespace

Instance Method Details

#create_thorax_collectionObject



17
18
19
# File 'lib/generators/thorax/model/model_generator.rb', line 17

def create_thorax_collection
  template "collection.coffee", "#{thorax_path}/collections/#{file_name}.js.coffee"
end

#create_thorax_modelObject



13
14
15
# File 'lib/generators/thorax/model/model_generator.rb', line 13

def create_thorax_model
  template "model.coffee", "#{thorax_path}/models/#{file_name}.js.coffee"
end